Answers for "javascript split string into array and get last element"

4

javascript split get last element

a = "hello.dear.friends"
a.split(".").pop()
> "friends"
Posted by: Guest on February-18-2021

Code answers related to "javascript split string into array and get last element"

Code answers related to "Javascript"

Browse Popular Code Answers by Language