While I have a bit of experience in coding, I am very confused about why this code runs the wrong line of code. If you run this code in any compiler it returns 'hello' even though x is not equal to 4. If someone could explain, that would be great! Thanks.
let x = 5;
let y = 6;
while (x=5) {
   if (x=4) {
       console.log('hello');
       break;
}
   else if (y=6) {
        console.log('how are you?')
        break
} else {
        console.log('potato')
}
}
 
    