I understand (I think) that this JavaScript splits on the hash tag, but what would the 1 represent?
window.location.hash.split("#")[1];
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The split() method is used to split a string into an array of substrings, and returns the new array. Thus, the
[1]represents the second element of the split arraywindow.location.hash.split("#")[1];JavaScript Split Function