Linkurious interview question

1. Write a function swapping first and last word in passed string function invertFirstAndLastWord(sentence) {} console.log(invertFirstAndLastWord("I really love graphs")); // expected: "graphs really love I"