Question on code functions in JavaScript

I’m curious as to how this would be written outside of Grasshopper, because when input in basic JavaScript it keeps saying pickRandom is not defined. How would I go about fixing this code?

I have the same question about drawbox. I thought this was a Javascript learning app, but it seems it is its own coding lanhuage.

@Dary_Rodriguez @Apathy

Hey there,

We use a number of custom functions in Grasshopper to teach concepts. You can read more about these functions, as well as how to create them outside Grasshopper, here.

This is where my issue lies

pickRandom() is a custom function that we wrote to use within Grasshopper. See the link I posted. If you want to use it outside the app, you’ll have to create it.

Hope this helps!

How would you create it in JavaScript? The diagrams didn’t really explain that.