Conquer the JavaScript Interview: Integer Reverse [Beginner Skill Level]

Veröffentlicht am: 02 Dezember 2022
auf dem Kanal: Covalence
178
6

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


Auf dieser Seite können Sie das Online-Video Conquer the JavaScript Interview: Integer Reverse [Beginner Skill Level] mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Covalence 02 Dezember 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 178 Mal angesehen und es wurde von 6 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!