Write a reverse integer function using string and array methods

Share this video with your friends

Send Tweet

In this lesson you will learn how to write an interview coding task which challenges you with reversing the integer and keeping the original sign intact. You will use different methods like toString, reverse, split and join to achieve the needed functionality using functional programming approach.

Joe Seifi
~ 4 years ago

good video, just wanted to call out that parseInt should likely be called with the radix parameter to avoid issues.

e.g. parseInt(n, 10)

Dimitri Ivashchukinstructor
~ 4 years ago

Good point👍🏼

Dimitri Ivashchukinstructor
~ 4 years ago

Good point👍🏼