Javascript Variable Help?

So I've been trying to get RPG Maker MV to try and check whether or not a variable is more than or less than a certain number. Unfortunately, it just comes up with a syntax error every time I try to get it to work.


Here's what I've got so far:


if (gameVariables.value(1) >= 6){


condition = true;


} else {


condition = false;


}


Can anyone tell me what I'm doing wrong?
Missing the $ in front of gameVariables.


when calling on variables and switches it should be $gameVariables or $gameSwitches 😀

Original thread: https://forums.rpgmakerweb.com/threads/javascript-variable-help.57666/