Javascript examples for Object:prototype
Prevent an object, function or variable to be defined twice
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*from w w w. j a v a 2 s. co m*/ window.foo = (window.foo || (function(){ console.log("111"); return true; }())); window.foo = (window.foo || (function(){ console.log("222"); return true; }())); } </script> </head> <body> </body> </html>