31

"Make it as simple as possible. Just use document.write()"

Primitive script in its purest form.

Comments
  • 3
    substr instead of substring? Must be way too legacy

    Also, why substr from index 1?
  • 1
    @asgs It was quick and both methods should to the same. Using substring may be clearer though. You're right with that.

    Is used index 1 to remove the first character ("#"). I have an url like /rooms.html#<UUID> and need just the uuid.
    document.location.hash also includes the hash.
  • 4
    I definitely will use that exception throwing from now on 😂
Add Comment