Skip to content

Instantly share code, notes, and snippets.

@LilinYume
Created June 20, 2013 14:15
Show Gist options
  • Save LilinYume/5823080 to your computer and use it in GitHub Desktop.
Save LilinYume/5823080 to your computer and use it in GitHub Desktop.
window.onload = function ()
{
var print = Function("stringArg","document.write(stringArg)");
var println = Function("stringArg","document.write(stringArg+'<br>')");
var $int = Function("n","try{n = new Number(n);b = new Boolean(false);if( b !== n.isNaN ){Error.prototype.notInt = null;e = new Error();e.notInt = 'Invalid Type Error : ';document.body.innerText = e.notInt;}}catch(e){e.notInt;}return n");
document.write( $int(10) );
//document.write( $int('a') );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment