options.async=options.async.toLowerCase()=='false'?false:true;在phpstorm有個(gè)報(bào)錯(cuò)? ? ? ? '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.?所以隨便問(wèn)
這句JS能寫(xiě)的更簡(jiǎn)單嗎?
hhhzihao2
2017-03-17 14:25:57