1. Jonathan Fine
  2. javascript-for-python-programmers

Commits

Jonathan Fine  committed 48305b8

call-apply.js: Added return_this() and isthisable().

  • Participants
  • Parent commits d641e50
  • Branches default

Comments (0)

Files changed (1)

File source/examples/call-apply.js

View file
     '' + args === '[object Object]' || ddt();
     '' + arguments_to_array(args) === '0,1,2,3' || ddt();
 })();
+
+
+var return_this = function(){return this;};
+var global = return_this();
+
+var isthisable = function(obj){
+
+  return return_this(obj) === global;
+};