How does the Use Javascript function work?

lightwriter
23 Sept 2015, 20:11
I've been trying to toy around with using javascript but I'm a bit confused.
I know enough code to realize JS.whatever() is reffering to a javascript file so what kind of info would I put into the () to run a certain function?

Pertex
23 Sept 2015, 20:36
The name of the JS function :?

lightwriter
23 Sept 2015, 20:41
So JS.Name refers to a function itself?

Pertex
24 Sept 2015, 10:45
Ah, now I got it. You can pass parameter to the JS-function

JS.test("hello")


Javascript:

function test(text) {
alert(text);
}