Link to this Playlist:
• Conquering the JavaScript Interview
Previous Video for String Reverse with Native Methods:
• Conquer the JavaScript Interview: Rev...
This is a part of my Algorithms and Data Structures playlist series. We cover a lot of common interview questions asked during whiteboards for entry level developers. Learning to master these takes time, practice, and pattern recognition. So I'll be helping you equip a toolbelt and filling it with as many tools as I can to help prepare you crush those interviews! Remember: "Luck is where practice meets opportunity."
In this video we cover an algorithm that isn't something you'd probably do in the real world (like most interview questions lol): integer reverse! The goal is simple, we need a function to accept any negative or positive integer, and return the reversed version of it as a number and maintaining its *sign*. We achieve this by converting to a string, reversing it with a loop or native methods, and then parsing it back to an integer with parseInt(). We can then use an if/else statement testing if the input number is negative, or using the Math.sign() function to determine if our input was indeed a negative number. Happy Hacking! HACK THE PLANET!
Don't forget to like this video and subscribe to our channel – we're publishing more videos and walkthroughs every week. Comment below and let us know what you'd like to see next!
Join the Covalence community: https://covalence.io
Shop Covalence merch: https://covalence.merchntly.com
On this page of the site you can watch the video online Conquer the JavaScript Interview: Integer Reverse [Beginner Skill Level] with a duration of hours minute second in good quality, which was uploaded by the user Covalence 02 December 2022, share the link with friends and acquaintances, this video has already been watched 178 times on youtube and it was liked by 6 viewers. Enjoy your viewing!