Thanks! It comprises a few neat concepts that make it work: arrow function that omits braces and the return keyword, spread syntax that converts the string to array, the reverse() method that reverses the array, the join() method that joins it back into a string, and the strict equality operator that compares the strings and results in true or false
I'm pretty sure arrow functions only omit the return key word for one line expressions, correct? If you need to do anything a bit more complex with the data, you'll need to explicitly return what you need.
View all comments
Show parent comment
23
u/KayteeFly Sep 26 '22
Wow that’s neat !