![]() |
VOOZH | about |
JavaScript is an important programming language that is mainly developed for web use cases and it plays a vital role in improving the responsiveness and usefulness of websites. On the other hand, Microsoft Edge is a web browser that offers a built-in JavaScript engine for development. So here, we'll understand the features, benefits, and steps to run Javascript using Microsoft Edge.
Microsoft Edge provides an environment to debug your javascript code. It contains many features which are also listed below, you can perform any possible web-related operations with this tool.
Step 1: Open Microsoft Edge
Step 2: Navigating to the Web Page: Go to the web page on which you want to execute JavaScript or navigate to the desired website.
Navigating to GFG page
Step 3: Open Developer Tools
There are 3 methods to open developer tools:
1. Using Right-click :
2. Using Keyboard Shortcut :
3. Using Menu Option:
Step 4: Go to the Console Tab: In the developer tools , locate the Console tab.
Step 5: Write and Execute JavaScript Code: On the console, type JavaScript code. For example :
console.log("Hello, World!");Then , press Enter to execute. The result of the above code will be displayed on the console.
Step 6: Inspect the Elements: The developer tools also allows you to inspect the Document Object Model of the web page. You can select the Elements tab to inspect HTML elements.
Example : Here we will explain a simple HTML with Javascript code that is executed through Edge Console to print some message.
Steps :
Example Code :
Output :
Running JavaScript in Console
The JavaScript console in Microsoft Edge is a useful tool of development for web developers. It provides an environment for testing, debugging the JavaScript code. Here, we learnt to use the Microscoft edge to execute Javascript code and also manipulate the DOM.