options.async=options.async.toLowerCase()=='false'?false:true;在phpstorm有個報錯? ? ? ? 'options.async.toLowerCase()=='false'?false:true' can be simplified to
? ?'options.async.toLowerCase()!='false'' 更少...
? ?(Ctrl+F1)This inspection reports any instances of JavaScript conditional
? ? ?expressions of the form condition?true:false
? ? ?or condition?false:true.
? ? ?These expressions may be safely simplified to condition
? ? ?or !condition , respectively.?所以隨便問
這句JS能寫的更簡單嗎?
hhhzihao2
2017-03-17 14:25:57