javascript - Is there a quicker way to write conditional statements? -
i have statement this:
 if(window.location.hash != '' && window.location.hash != '#all' && window.location.hash != '#') can write have mention window.location.hash once?
the obvious way is:
var h = window.location.hash; if (h != '' && h != '#all' && h != '#') 
Comments
Post a Comment