so lets say i have a url http://www.hello.com#one
i know i can grab the has value
var hash = window.location.hash;
alert (hash);
but rather then write (i know the below is not propper code):
if var hash = one then set var hashValue to 1
else
if var hash = two then set var hashValue to 2
else etc etc
is there a better way to write this.
Cheers
This will set hashValue to
undefinedif hash doesn’t exist in the map.