0
Why isn’t this code returning the right answer? I’m testing through the Chrome console. In the tests I change the value of var, but nothing happens.
Following the example of the class I am doing, everything is correct. I am forgetting some detail?
Follows the code:
var kills = 2;
if (kills = 0){
console.log('Seu noob!');
}else if (kills > 1 && kills <= 3){
console.log('Killer!');
}else if (kills > 4 && kills <= 10) {
console.log('Violent!');
}else if (kills > 11){
console.log('Unstoppable!');
};
if (kills = 0){
you are making an assignment and not a comparison==
– Guilherme Lautert
Wonderful! That was it! Solved!
– Angelo Scali