JavaScript Split Get Last Element

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