How to call a JavaScript Function from Chrome Console?

JavascriptWeb DevelopmentFront End Technology

To call a JavaScript function from the console, run the following code:

Example

<!DOCTYPE html>
<html>
   <body>
      <script>
         var display = {
            displayOne: function(){ return "displayTwo" ;}
         };
         console.log(display.displayOne());
      </script>
   </body>
</html>
raja
Published on 30-Jan-2018 16:23:07
Advertisements