click on a block answer a question or 2 and program JavaScript it's as easy as that! :) to get the answer of a question just use the variable "answer" :) pick random with variables does not work. 47 blocks!! Example: 1. If you wanted to "Set [ coins ] to ( 100 )" and then "Set [ money ] to ( 50 )" then you would first convert each individually to Javascritpt. You would get "coins = 100;" and "money = 50;". If you simply want to set the money after you set the coins then you simply put the code right after each other like: "coins = 100; money = 50;". This should be your HTML: <html> <head> <title> whateverYourNameIs </title> </head> <body> <canvas id="myCanvas" width="480" height="360" style="border:1px solid #000000;"> </canvas> <script src="YourJavascriptFile.js"></script> </body> </html> Also please note that the x and y coordinates are backwards and that at the beginning of your Javascript file there must be this: var ctx = document.getElementById("myCanvas"); var c = ctx.getContext("2d"); #Javascript #Tutorial #Coding
I know this is pretty confusing so if you have ANY questions whatsoever PLEASE just ask me. Please heart and favorite! I used the 'ASK()' from https://scratch.mit.edu/projects/68944158/ that was by gwgw99 but because I saw a mistake and wanted more blocks I made this. ! PLEASE TELL ME IF I MADE A MISTAKE ! Thank you! :)