Solution:

//change the number to a string and reverse
//to string will have to be split and joined back together
// then, we have to compare it to the original string
var isPalindrome = function(x){ return x.toString().split("").reverse().join("") === x.toString()};

✨✨✨And that’s it!

Tish⚡️🎧🌙

--

--

Tish Faroul

MHA grad & Software Engineer | Rails | React | JavaScript | CSS | HTML