codice:
var sottostringa=stringa.substr(-4);
ciao