简体   繁体   中英

invalid left hand assignment javascript

So I am coding a bot script in javascript for a CS:GO betting website and i'm getting an invalid left hand assignment any help?

if(lastRollColor !== lastBetColor && 0=0){
     betColor = 'black';
}

Thanks

0=0 is an assignment. You cannot assign to a constant value.

What you probably want is 0==0 . You could just change that to true ... and then remove it entirely, because it wouldn't do anything.

0=0 is an assignment. You can not assign to 0 .

0==0 is a comparison.

But anyway, the condition 0==0 is usually a leftover from debugging,
eg you replace it with 0==1 to "disable" a condition.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM