+ 2
how can I choose 2 random elements and change there value from no thing (undefined) to number (2 or 4) by JavaScript jQuery
i wanna make game 2048
3 Antworten
+ 4
var twoOrFour = Math.floor(Math.random()*2) ? 2:4;
console.log(twoOrFour);
https://code.sololearn.com/WiI2yQ0pQoQJ/?ref=app
+ 1
Calviղ can you explain more
by document elements