You can use parseInt:
var bin = parseInt('10101010', 2);
The second argument (the radix) is the base of the input.
More Related Contents:
- Convert a binary NodeJS Buffer to JavaScript ArrayBuffer
- Sending binary data in javascript over HTTP
- JavaScript: Need functions to convert a string containing binary to hex, then convert back to binary
- How to convert text to binary code in JavaScript?
- How to save binary data of zip file in Javascript?
- How do I read binary data to a byte array in Javascript?
- Writing binary data using node.js fs.writeFile to create an image file
- How to have html popup appear over main html page?
- Browser detection in JavaScript? [duplicate]
- Comparing date part only without comparing time in JavaScript
- What is the correct term for variable shadowing in JavaScript?
- How to replace remapColums with remapColumnsByName in free jqgrid
- window.onbeforeunload not working on the iPad?
- Why is useState not triggering re-render?
- Label outside arc (Pie chart) d3.js
- regex street address match
- How to publish a module written in ES6 to NPM?
- How do I return a longitude and latitude from Google Maps JavaScript geocoder? [duplicate]
- Why the open quote and bracket for eval(‘(‘ + jsonString+ ‘)’) when parsing json string
- Understanding JS Promises
- How can I enter data into a custom-handled input field?
- Implementing jquery UI autocomplete to show suggestions when you type “@”
- How to mock Axios with Jest?
- How to delay execution in between the following in my javascript
- Show pop-ups the most elegant way
- Reading multiple files with Javascript FileReader API one at a time
- javascript: what’s the difference between a function and a class
- Rename Object Key in an array using javascript
- How to add spaces between every character in a string?
- Why can’t I check if an array is empty with array == []?