Ad

Simplest inversion

Code
Diff
  • // write a add function that doesn't use the plus symbol
    function add(a, b){
      return -(-a - b);
    }
    • // write a add function that doesn't use the plus symbol
    • function add(a, b){
    • return --a - ~b;
    • return -(-a - b);
    • }