I have the phrase: " Tomorrow it will rain ". I want to get the last word and leave it like this: " Rain, Tomorrow will ".
I'm doing it this way:
var frase = 'Amanhã vai chover';
var palavra = strg.split(' ')[0];//
I can get the: Tomorrow ... Now, how do I get the last one and leave it in the default above using JavaScript?