Javascript help please! (Return/function question)

Miscellaneous Forums/General Discussion/Javascript help please! (Return/function question)

You need to place semicolons at the end of every line in Javascript, like in C :)

(This is because different platforms have different newline things).

eg:
function change_b(selected)
{
selected=2;
return selected;
}

Note that I did not put a semicolon after Function. This because you could start writing out the function on the same line as that curly brace, and that curly brace could easily be on the same line as the actual function.
Same goes with any other of those sorts of things, such as If and Repeat.