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>
To call a JavaScript function from the console, run the following code:
<!DOCTYPE html> <html> <body> <script> var display = { displayOne: function(){ return "displayTwo" ;} }; console.log(display.displayOne()); </script> </body> </html>