Commits

Anonymous committed 19e88fb

Modify testtools.js to work with Rhino (and hope still works with jsdb).

Comments (0)

Files changed (1)

core-javascript/javascript-exercises/testtools.js

 
 // Define a global function 'log'.
 var log;
-if (this.hasOwnProperty('jsArguments')){
+if (this.writeln){
+    log = writeln;
 
+} else {
     log = function(s){
         print(s + '\n');
     };
-} else {
-    log = print;
-    log = writeln;              // Wrong, but get us working in jsdb.exe.
 }
 
 //