I started to study javascript recently and the following code is only giving me the wrong answer, where did I go wrong?
When I play at the prompt to check if it's right, it gives me "n1 is odd"
// Verifique se um número é par ou ímpar
var n1 = 4;
var sobra = n1%2;
if(sobra = 0){
console.log("n1 é par")
}else{
console.log("n1 é ímpar")
};