Is `if (condition = value)` the correct syntax for comparison?

前端 未结 5 1417
轮回少年
轮回少年 2020-12-12 00:30

If if((hit.transform != transform) means if hit.transform is Not transform, then how do I check if the statement Is correct. if(hit.transfor

5条回答
  •  情歌与酒
    2020-12-12 00:50

    You need to use '==='

    Here is the first result on google with an explanation http://geekswithblogs.net/brians/archive/2010/07/03/quality-equality-with-javascript-quotquot-gt-quotquot.aspx

提交回复
热议问题