Solution in Java script with filter(), join(), reverse() funtions


#1

module.exports = {
//param A : string
//return a strings
solve : function(A){

   return  A.split(' ').filter((word)=> word.length> 0).reverse().join(' ');



}

};