JavaScript split dapatkan elemen terakhir

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