Help converting script code to MV

I tried looking it up and even looked at the script call list to try and convert it myself, but i just couldn't figure it out. So is there a way to convert this line into MV: $game_map.event[8].region_id == 1
$gameMap.event(8).regionId() === 1
$gameMap.event(8).regionId() === 1
Thank you so much this worked perfectly. I was mising the parenthesis after the region id and the third =
Thank you so much this worked perfectly. I was mising the parenthesis after the region id and the third =
In theory it'll work with two equals signs, but using === instead of == is general best practice in JS.

Original thread: https://forums.rpgmakerweb.com/threads/help-converting-script-code-to-mv.144323/