Quantcast
Viewing latest article 1
Browse Latest Browse All 15

Answer by Jonathan for Get everything after the dash in a string in JavaScript

Efficient, compact and works in the general case:

s='sometext-20202's.slice(s.lastIndexOf('-')+1)

Viewing latest article 1
Browse Latest Browse All 15

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>