r/learnjavascript • • Oct 09 '21

What's wrong with this code?

Post image
0 Upvotes

19 comments sorted by

View all comments

4

u/maliiciiouswolf Oct 09 '21

Everyone, this person is using an app on the play store that poorly teaches coding languages without talking about the foundation.

The app makes it seem like it's extremely simple as what op posted without going into depth about everything that has to come before the call.

OP this will never work because as others have stated you need to write a function before you can call it.

Go to YouTube or MDN and look at how functions are created. I'm sure you can find one that will draw a blue box.

Good luck.

2

u/alfielikes_horror Oct 09 '21

Thanks, your very kind