What function or method converts number (2354) to binary code (001011001010)? Thanks
1 Answer
try this :
number= 2345
binary = number.toString(2)
console.log(binary)
the result of this code is : 100100101001
btw : 001011001010 in binary is equal to 714 in decimal ;) https://www.rapidtables.com/convert/number/binary-to-decimal.html
2 Comments
Ivar
Please don't answer questions that have been asked many times before. We mark them as duplicate so all the good and up-to-date content stays in one place.
Yar Ozerov
Thanks. Yeah, I've found the answer. Not good start for me in asking. Now trying to ask "is any analog of jquery.bacstretch in react" but I can't because of questions limit(