In this video I'll be taking you step by step in detail how I solved the "Bit Counting" challenge in 3 easy steps using javascript on codewars .com.
This is a great video to practice using the replace function as well as learning about the radix parameter and how to change a string into an integer.
The steps I took to complete this challenge are as follows(I go into more detail in the video):
STEP 1
Convert the number to binary.
STEP 2
Remove zeros from the string
STEP 3
Iterate through the digits and add them up.
Useful links:
Radix: https://goo.gl/y6GWRe;
parseInt: https://goo.gl/Ypd6SP
On this page of the site you can watch the video online Codewars Javascript - Bit Counting - SOLVED IN 3 EASY STEPS! with a duration of hours minute second in good quality, which was uploaded by the user Code Noob 16 August 2017, share the link with friends and acquaintances, this video has already been watched 2,037 times on youtube and it was liked by 23 viewers. Enjoy your viewing!