does in_array work in rpg maker mv

Code:
  var test1 = function() {
    var people = array("Peter", "Joe", "Glenn", "Cleveland");
    if (in_array("Glenn", people)) {
      $gameMessage.add('Glenn');
    };
  };
I try this but it doesn't work
thank you
learn from this
https://www.w3schools.com/php/func_array_in_array.asp
and this
https://stackoverflow.com/questions...-not-equal-to-multiple-string-values/19950682
Um, you're using php scripts in Javascript? No wonder it doesn't work.

Code:
var arr = [1, 2, 3, 4];
if (arr.includes(1)) $gameMessage.add("Whatever");
For older than 1.5.2 use arr.contains instead.
Um, you're using php scripts in Javascript? No wonder it doesn't work.

Code:
var arr = [1, 2, 3, 4];
if (arr.includes(1)) $gameMessage.add("Whatever");
For older than 1.5.2 use arr.contains instead.
Thank you
I use JavaScript + whatever in google
And with my less knowledge and careful with code so I end up there - -“
I think it is the same because it look familia

Original thread: https://forums.rpgmakerweb.com/threads/does-in_array-work-in-rpg-maker-mv.116131/