Hi, Why the button "decbin" doesn't work? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 8

Hi, Why the button "decbin" doesn't work?

It's on line 89. Function DecToBin is on line270-js https://code.sololearn.com/W26TK9tRyWl6/?ref=app

11th Sep 2020, 7:29 AM
Egor Tonchev(EGO)
Egor Tonchev(EGO) - avatar
2 Answers
+ 10
Thanks Diviya, It works fine!!
11th Sep 2020, 8:21 AM
Egor Tonchev(EGO)
Egor Tonchev(EGO) - avatar
+ 2
replace line 276,277 line of js code with this document.Clcltr.Button. value = (parseInt(button)).toString(2); actually button var is string and binary conversion work on integer so first make it integer datatype
11th Sep 2020, 8:07 AM
Divya Mohan
Divya Mohan - avatar