Guide to JS Developer Console for beginners

1. Console

1.1 Go to Settings
1.2 Go to More tools
1.3 Go to Developer Tools
1.4 You can go to Developer Tools directly with Ctrl+Shift+i (windows)
1.5 Here switch the tab from Elements to Console
1.6 Here is your console!!
1.7 Here you can …


This content originally appeared on DEV Community and was authored by Sakshi

1. Console

1.1 Go to Settings
1.2 Go to More tools
1.3 Go to Developer Tools
1.4 You can go to Developer Tools directly with Ctrl+Shift+i (windows)
1.5 Here switch the tab from Elements to Console
1.6 Here is your console!!
1.7 Here you can try writing

alert("hello");
console.log("hello from console");
prompt("Hey! Whats your name");

1.8 If you need to modify a command that you passed through the Console, you can type the up arrow (↑) key on your keyboard to retrieve the previous command. This will allow you to edit the command and send it again.

You can modify HTML from console, but as the page refreshes, the changes will not exist, you can just experiment there.

2. DOM - Document Object Model

DOM is created every time the browser reloads the page.
The DOM is a tree of Objects and shows the HTML elements within a hierarchical view. The DOM Tree is available to view within the Elements panel in Chrome.

Image description

Also you can modify the styles by unchecking the box. You can find side panel where styles applied to the web page is visible.

Image description

Notice how one style is removed by unchecking the box, appears as strike through

Image description

3. Network

This is to monitor and record network requests.
Reload the page to see network activity. Right now it is empty.

Image description

After reload :

Image description

See the network activity. It shows Name, Status, Type, Initiator, Size, Time and Waterfall.

  • Status - The HTTP response code.
  • Type - The resource type.
  • Initiator - What caused a resource to be requested. Clicking a link in the Initiator column takes you to the source code that caused the request.
  • Time - How long the request took.
  • Waterfall - A graphical representation of the different stages of the request. Hover over a Waterfall to see a breakdown.

4. Responsive Design

In chrome, you can check whether your website is device compatible or not.

Image description

You can change dimensions by clicking on the three dots near device icon on top left. Select 'Show Media Queries' there and adjust the dimensions which are visible on the top of browser window.

Thanks for reading!


This content originally appeared on DEV Community and was authored by Sakshi


Print Share Comment Cite Upload Translate Updates
APA

Sakshi | Sciencx (2023-04-16T12:13:26+00:00) Guide to JS Developer Console for beginners. Retrieved from https://www.scien.cx/2023/04/16/guide-to-js-developer-console-for-beginners/

MLA
" » Guide to JS Developer Console for beginners." Sakshi | Sciencx - Sunday April 16, 2023, https://www.scien.cx/2023/04/16/guide-to-js-developer-console-for-beginners/
HARVARD
Sakshi | Sciencx Sunday April 16, 2023 » Guide to JS Developer Console for beginners., viewed ,<https://www.scien.cx/2023/04/16/guide-to-js-developer-console-for-beginners/>
VANCOUVER
Sakshi | Sciencx - » Guide to JS Developer Console for beginners. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2023/04/16/guide-to-js-developer-console-for-beginners/
CHICAGO
" » Guide to JS Developer Console for beginners." Sakshi | Sciencx - Accessed . https://www.scien.cx/2023/04/16/guide-to-js-developer-console-for-beginners/
IEEE
" » Guide to JS Developer Console for beginners." Sakshi | Sciencx [Online]. Available: https://www.scien.cx/2023/04/16/guide-to-js-developer-console-for-beginners/. [Accessed: ]
rf:citation
» Guide to JS Developer Console for beginners | Sakshi | Sciencx | https://www.scien.cx/2023/04/16/guide-to-js-developer-console-for-beginners/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.