-5
Je veux utiliser la valeur d'une variable dans un tableau, comme ceci.Javascript var inisde tableau
var advalue = Math.floor(Math.random * 6);
var ads = ["Hello", "World", "Randomword", "123", "1233", "0000"];
API.sendChat("Word: " + ads[advalue]);
Quand je cours, je reçois undefined
fin, et où est le problème? – panther
Je reviens avec un indéfini. – user2654319
'Math.random()' est une fonction, pas une propriété. – deceze