📜 ⬆️ ⬇️

Visual programming language Google Blockly

Blockly is a visual programming language with a web interface. Creating a program is carried out by connecting blocks.



Some demos:
Maze - use Blockly to go through a maze.
Code - export the Blockly program to JavaScript, Dart, Python or XML.

So far, Blockly is in a technological preview mode. All developers are invited to play and express their ideas.
')


After export to javascript:
var n; var A; var i; var x; var j; n = 100; A = []; for (i = 0; i <= n; i++) { A[i - 1] = true; } var i_end = Math.sqrt(n); for (i = 2; i <= i_end; i++) { if (A[i - 1] == true) { j = Math.pow(i, 2); while (j <= n) { A[j - 1] = false; j = (j || 0) + i; } } } for (x = 2; x <= n; x++) { window.alert([x,': ',A[x - 1]].join('')); } 

Source: https://habr.com/ru/post/145067/


All Articles