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
Watch video Conquer the JavaScript Interview: Integer Reverse [Beginner Skill Level] online without registration, duration hours minute second in high quality. This video was added by user Covalence 02 December 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 178 once and liked it 6 people.