Both Scratch and the Javascript Blocks Editor (powerd by Makecode) build on the Blockly library, a tool for visual programming. There are subtle differences in the code blocks for each editor that change the behaviour of the program.


Javascript Blocks

Events wait for a user action, like clicking the green flag in scratch or pressing a button on the keyboard


Input waits for a user input like pressing the A button or shaking the micro:bit

Control is about the flow of your program tasks. In scratch you can add a forever, repeat or if block to an event to trigger it.

Javascript Blocks breaks controls into programming concepts. Forever is it’s own loop (it’s triggered as soon as the micro:bit is powered on).

Repeats are found in the Loops menu of Javascript Blocks

And if blocks are found in the Logic menu


Operators let you do arithmetic and make comparisons

Arithemetic and random number pickers can be found in Math, whereas a comparison between something and something else is found in Logic

Data lets you define variables that might change within your program. Here we have made a variable called item

We can define these in the Variables menu of makecode

Looks let you display actions on the screen, which  can be done by adding a say block. The word in the box is called a string


To show a word on the micro:bit display we can use show string, found in the Basic menu

There are many more differences and simialrities between Scratch and Javascript Blocks, if you would like to add some, please contact us