Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<title>Foo</title>
<div>Expected value: <b>10</b></div>
<div>Actual value: <b id="ret"></b></div>
<script>
  var a=(b,c,...d)=>d.length<b.length&&((...e)=>a(b,c,...d,...e))||b.apply(c,d)
  var obj = function() {};
  obj.prototype = {
    example : function(a, b, c, d) {
      return a + b + c + d;
    }
  };
  var Obj = new obj();
  document.getElementById("ret").innerHTML = a(Obj.example, Obj, 1)(2)(3, 4);
</script>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
Alexei-Bpro
0viewers