Why the following is not being printed to the console? I cant understand what the error is ..can Some one help me debug the error.
<script type="text/javascript" src="static/js/scenes/scene_world.js">
  //document.write("<button type='button' onclick='click();'>Click Me!</button>");
  //document.write("<input id='clickMe' type='button' value='clickme' onclick='lol();' />");
    console.log("lol");
  </script>
inside scene_world.js:
  function lol(){
  console.log("lol");
  }
Tired accessing it from outside like this:
  <script type="text/javascript" src="static/js/scenes/scene_world.js">
  //document.write("<button type='button' onclick='click();'>Click Me!</button>");
  //document.write("<input id='clickMe' type='button' value='clickme' onclick='lol();' />");
  </script>
  <script>
  document.write("<input id='clickMe' type='button' value='clickme' onclick='lol();' />");
  </script>
But it is giving me this error:
Uncaught ReferenceError: lol is not defined
 
     
     
     
     
    