Search the Blog

Sunday, August 11, 2019

Javascript Console opening in different browser

In current browsers, the JavaScript Console has been integrated as a tab with in Developer Tools. The shortcut keys will open Developer 


Chorme -

Opening the “Console” panel of Chrome’s DevTools:

WINDOWS/LINUX

-> CTRL + SHIFT + I
-> CTRL + SHIFT +J
-> F12

MAC OS 
-> Cmd + Opt + J

ESC- Used for on and Off

Firefox -

Opening the “Console” panel 

WINDOWS/LINUX

-> CTRL + SHIFT + K
-> CTRL + SHIFT + I
-> F12

MAC OS 
-> Cmd + Opt + K

ESC- Used for on and Off

Edge and Internet Explorer -

Opening the “Console” panel 

-> F12

ESC- Used for on and Off

Opera -

Opening the “Console” panel 

-> CTRL + SHIFT + I

ESC- Used for on and Off

JavaScript Console methods and objects

The information displayed by a web console/debugging is made available through the multiple methods of the console Javascript object that can be consulted through console.dir(console). Besides the console.memory property, the methods displayed are generally the following-

1  - assert
2  - count
3  - clear
4  - debug
5  - dir
6  - dirxml
7  - error
8  - group
9  - groupEnd
10- groupCollapsed
11- info
12- log
13- markTimeline
14- profile
15- profileEnd
16- table
17- time
18- timeEnd
19- timeStamp
20- timeline
21- timelineEnd
22- trace
23- warn

JavaScript Comments usage and sample example

To add annotations, hints, or exclude/hide some code from being executed JavaScript provides two ways of commenting code line as in JAVA programming language.

Single line Comment (//)
 what we are writing  after // will not be executed
  example :-// this is www.dizsweb.com

Multi-line Comment (/**/)
 what we are writing  after // will not be executed
  example :-
/*
In this website you will get all type of code logic and content with example with code and definitions
of different type ion which java javascript database sql , sql server.
*/


NOTE:- Usage of HTML comments in javascript code is bad practice

Translate