I understand (I think) that this JavaScript splits on the hash tag, but what would the 1 represent?
window.location.hash.split("#")[1];
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 array window.location.hash.split("#")[1];
JavaScript Split Function
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With