var x = 'x' x-'m'||console.log('True 1') // logs True, should be falsevar x = '2' x-2||console.log('True 2') // logs Truevar x = '3' x-2||console.log('True 3') // logs False為什么如果其他速記在使用字符串時總是返回 true?如何修復?我從這里學到了這一點
javascript if else shorthand and strings
慕斯709654
2022-08-04 10:38:07