Split JavaScript Get Last Element

a = "hello.dear.friends"
a.split(".").pop()
> "friends"
Cerbrain