Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. const addBinary = (a, b) => (a + b).toString(2);
  2.  
  3. console.log(addBinary(1, 5))
  4.  
  5. const convertToBinary = (number) => {
  6. return number.toString(2);
  7. }
  8.  
  9. console.log(convertToBinary(6))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement