parseInt not converting decimal to binary?

Use toString() instead of parseInt:

11..toString(2)
var str = "11";
var bin = (+str).toString(2);
console.log(bin)

According JavaScript’s Documentation:

The following examples all return NaN:

parseInt("546", 2); // Digits are not valid for binary representations

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)