GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing maker.makecode.com — JavaScript Block JavaScript BlockJavaScript is a very powerful language; so powerful that some concepts in JavaScript can't be shown using blocks. When PXT encounters a piece of code that can't be converted into blocks, it instead creates a grey JavaScript block to preserve it. These blocks get converted right back into the original JavaScript when you switch back to the text editor. The code in JavaScript blocks cannot be edited, but the blocks themselves can be moved, copied, pasted, and deleted just like any other block. How do I get my JavaScript code to convert without any grey blocks?The easiest way to write code that will convert cleanly back to blocks is to write the code using blocks and convert it to JavaScript. Many blocks have a very specific structure to their JavaScript that must be followed in order to have them convert properly. If you have a piece of your code that does not convert, try looking at the block you were expecting and the JavaScript it produces. For example, a for-loop must have this structure to convert to a block: The following examples can't be represented by the blocks: Try to match the JavaScript of the desired block as closely as possible. |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |