7/24/2023 0 Comments Khan academy coding courses![]() Random(a, b) is not Math.random() but rather a processing.js helper function which itself uses Math.random to give a result between a and b. The sandbox curates the environment to combine a subset of native javascript and processing.js functions (which themselves come in the form of javascript from the processing.js library). In other words the code is taken from a document editor on the left, in text form, then mulled over and injected into a sandboxed running environment on the right. The Khan Academy CS sandbox uses the processing.js library, but the sandbox itself uses plain old javascript - though there several steps that the code goes through before it is rendered in the output window on the right. The original Processing language is a subset of Java, however there is a javascript version called processing.js. I am a CS college student and I play with KACS a lot. This is a bit late to be of use to the original question, but good luck to anyone who may find this useful.
0 Comments
Leave a Reply. |