Easy Way to Convert a Decimal Number to a Binary Number using Javascript

decimal to binary

In this article, I will be sharing an easy way to convert a decimal number to a binary number using javascript. Decimal Number to Binary Number using Javascript function decimalToBinary(num) { let binary = [] while (num > 0) { binary.push(num % 2) num = Math.floor(num / 2) } console.log(binary.reverse().join(”)) } decimalToBinary(10) // Result: 1010 … Read more

Aadhar Card Number Validation in Javascript

Aadhar Card Number Validation in Javascript

This article will teach the Aadhar Card Number Validation in Javascript. The Aadhaar card number is a unique 12-digit identification number issued by the Unique Identification Authority of India (UIDAI) to the people of India. It serves as proof of identity and address and is used for various government and non-governmental operations. The Aadhaar card … Read more