JSFiddle - React, Tailwind, and code Playground

by suhail

JavaScript

var str="Idfdxfgds want".split(' ');
var lastword=str.pop();
console.log(str.join(' '));