View Single Post
Old 10-07-2012, 10:27 PM   PM User | #5
Logic Ali
Regular Coder

 
Logic Ali's Avatar
 
Join Date: Sep 2010
Location: London
Posts: 959
Thanks: 0
Thanked 198 Times in 193 Posts
Logic Ali will become famous soon enoughLogic Ali will become famous soon enough
Quote:
Originally Posted by xelawho View Post
fair enough. seems overly cautious though... if the string is index.html?car=

then window.location.search.substring(1).split("=")[1]

will return blank, which obviously != "mercedes", so why?
I just don't like to see the practice of assuming the existence of an object or element, even if it's not fatal.
Logic Ali is offline   Reply With Quote