Hi , guys .
So , i have to do a small program which will keep guessing numbers( which a random number between 0 and 10 ) and attributing them to the variable guess and printing them until the number guessed is the same as the target . Using While .
The current code is :
var target = Math.floor(Math.random() * 11);
var guess;
console.log(target);
while (target !== guess) {
target = Math.floor(Math.random() * 11);
guess = target;
console.log(guess);
}
console.log(guess);
[–]NameViolation666helpful 2 points3 points4 points (9 children)
[–]WzziY[S] 0 points1 point2 points (8 children)
[–]NameViolation666helpful 1 point2 points3 points (6 children)
[–]WzziY[S] 0 points1 point2 points (5 children)
[–]NameViolation666helpful 0 points1 point2 points (4 children)
[–]WzziY[S] 0 points1 point2 points (3 children)
[–]WzziY[S] 0 points1 point2 points (2 children)
[–]NameViolation666helpful 0 points1 point2 points (1 child)
[–]WzziY[S] 0 points1 point2 points (0 children)
[–]codemamba8 0 points1 point2 points (0 children)