+ 5

Drawbox

I was learning JS on an iOS app called Grasshopper. It used the following code to teach me the basics: DrawBox ( blue ); And this immediately ran a blue box on the playground, but I can't do that on the playground in solo learn, why is this? Sorry if this is a silly question.

28th May 2018, 8:07 PM
David Canoa
David Canoa - avatar
6 Respuestas
+ 3
Btw if you want to play around with graphics, here's a list of everything the canvas context can do: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D
28th May 2018, 8:26 PM
Schindlabua
Schindlabua - avatar
+ 7
yeah i search drawBox because i was wondering the same thing. So thank you! And thank you Schindlabua for the link!
7th Jun 2019, 3:08 AM
toto
toto - avatar
+ 3
I don't know the app, but DrawBox isn't really javascript. It's a function they wrote to make things simpler to explain I would guess! Doing graphics in Javascript is pretty easy compared to other languages. Here's how that would look like: https://code.sololearn.com/Wp7Oan45Ci5I/#html
28th May 2018, 8:17 PM
Schindlabua
Schindlabua - avatar
+ 2
thank you :) that clarifies things
28th May 2018, 8:22 PM
David Canoa
David Canoa - avatar
+ 1
so cool!! :) thank you! you’ve given me a fair bit to play with here
28th May 2018, 8:31 PM
David Canoa
David Canoa - avatar
- 1
Ok people are showing html stuff in using js doesn't that stand for Java script idk how this html stuff works I have the same problem and I want to know
24th Nov 2018, 11:18 PM
Neko lolipop
Neko lolipop - avatar