SlideShare a Scribd company logo
console in JavaScript
A Web console is a tool which is mainly used to log information associated with a web page
like: network requests, javascript, security errors, warnings, CSS etc. It enables us to interact
with a web page by executing javascript expression in the contents of the page.
console in
JavaScript
• log()
• error()
• warn()
• clear()
• time() and timeEnd()
• table()
• count()
• group() and groupEnd()
• custom console logs
console.log() method
console.log('abc');
console.log(1);
console.log(true);
console.log(null);
console.log(undefined);
JavaScript in string/
Magic of backtick ``
Add any JavaScript inside
backtick using ${}
Custom Console Logs
const spacing = '10px';
const styles =
`padding: ${spacing}; background-color: white; color: red;
font-style:
italic; border: 1px solid black; font-size: 2em;`;
console.log(‘%Learn With Vivek', styles);
console.error()
Used to log error message to the console. Useful in testing of code.
By default the error message will be highlighted with red color.
console.error('This is a simple error');
console.warn()
Used to log warning message to the console. By default the
warning message will be highlighted with yellow color.
console.warn('This is a warning.');
Assignment
• clear()
• time() and timeEnd()
• table()
• count()
• group() and groupEnd()
• custom console logs

More Related Content

PPTX
JavaScript Core fundamentals - Learn JavaScript Here
Laurence Svekis ✔
 
PDF
Introduction to Javascript programming
Fulvio Corno
 
PPTX
JavaScript DOM - Dynamic interactive Code
Laurence Svekis ✔
 
PPTX
Monster JavaScript Course - 50+ projects and applications
Laurence Svekis ✔
 
PDF
JavaScript Jump Start 20220214
Haim Michael
 
PDF
JavaScript guide 2020 Learn JavaScript
Laurence Svekis ✔
 
PPT
JAVA SCRIPT
Go4Guru
 
PPTX
Introduction To JavaScript Ajax
Reema
 
JavaScript Core fundamentals - Learn JavaScript Here
Laurence Svekis ✔
 
Introduction to Javascript programming
Fulvio Corno
 
JavaScript DOM - Dynamic interactive Code
Laurence Svekis ✔
 
Monster JavaScript Course - 50+ projects and applications
Laurence Svekis ✔
 
JavaScript Jump Start 20220214
Haim Michael
 
JavaScript guide 2020 Learn JavaScript
Laurence Svekis ✔
 
JAVA SCRIPT
Go4Guru
 
Introduction To JavaScript Ajax
Reema
 

What's hot (20)

PPTX
Javascript
Nagarajan
 
PDF
Debugging Javascript
SolTech, Inc.
 
PDF
JavaScript - Chapter 3 - Introduction
WebStackAcademy
 
PPTX
Java Script
husbancom
 
PPTX
Introduction to JavaScript
Marlon Jamera
 
PDF
Node.js Crash Course (Jump Start)
Haim Michael
 
PDF
JavaScript - Chapter 13 - Browser Object Model(BOM)
WebStackAcademy
 
PPTX
1. java script language fundamentals
Rajiv Gupta
 
PPT
JavaScript Missing Manual, Ch. 1
Gene Babon
 
DOC
Java script by Act Academy
actanimation
 
PPTX
JS & NodeJS - An Introduction
Nirvanic Labs
 
PDF
10 Groovy Little JavaScript Tips
Troy Miles
 
PPT
Java script
ITz_1
 
PPTX
Javascript 01 (js)
AbhishekMondal42
 
PPTX
Introduction to java_script
Basavaraj Hampali
 
PPT
JavaScript Basics with baby steps
Muhammad khurram khan
 
ZIP
The 5 Layers of Web Accessibility
Dirk Ginader
 
PPT
Js mod1
VARSHAKUMARI49
 
PPTX
Javascript Best Practices and Intro to Titanium
Techday7
 
PDF
Intro to JavaScript - Thinkful LA, June 2017
Thinkful
 
Javascript
Nagarajan
 
Debugging Javascript
SolTech, Inc.
 
JavaScript - Chapter 3 - Introduction
WebStackAcademy
 
Java Script
husbancom
 
Introduction to JavaScript
Marlon Jamera
 
Node.js Crash Course (Jump Start)
Haim Michael
 
JavaScript - Chapter 13 - Browser Object Model(BOM)
WebStackAcademy
 
1. java script language fundamentals
Rajiv Gupta
 
JavaScript Missing Manual, Ch. 1
Gene Babon
 
Java script by Act Academy
actanimation
 
JS & NodeJS - An Introduction
Nirvanic Labs
 
10 Groovy Little JavaScript Tips
Troy Miles
 
Java script
ITz_1
 
Javascript 01 (js)
AbhishekMondal42
 
Introduction to java_script
Basavaraj Hampali
 
JavaScript Basics with baby steps
Muhammad khurram khan
 
The 5 Layers of Web Accessibility
Dirk Ginader
 
Javascript Best Practices and Intro to Titanium
Techday7
 
Intro to JavaScript - Thinkful LA, June 2017
Thinkful
 
Ad

Similar to Console in javaScript (20)

PDF
Chrome DevTools
Blake Newman
 
PDF
Yavorsky
Maksym Stepanchuk
 
PDF
Maharashtra state board Hsc IT Chap 3.pdf
AAFREEN SHAIKH
 
PDF
8.-Javascript-report powerpoint presentation
JohnLagman3
 
PDF
Chrome DevTools 101
Juan Obando
 
XLS
Lt web quiz_answer
0983676660
 
PDF
V8 javascript engine for フロントエンドデベロッパー
Taketoshi 青野健利
 
PDF
Silverlight 2 For Developers
Mithun T. Dhar
 
PDF
"Why is there no artificial intelligence yet?" Or, analysis of CNTK tool kit ...
PVS-Studio
 
PDF
NodeJS for Beginner
Apaichon Punopas
 
PPTX
Price of an Error
Andrey Karpov
 
PPTX
Yogesh kumar kushwah represent’s
Yogesh Kushwah
 
PPT
Full-Stack JavaScript with Node.js
Michael Lehmann
 
PPTX
JavaScript Multithread or Single Thread.pptx
RAHITNATH
 
PPTX
Chapter04
Jirasak Sirirattanapol
 
PDF
Diagrama de secuencia
Diego Arturo Lugo Oceguera
 
PPT
Auto cad 2006_api_overview
scdhruv5
 
PPT
Sanwaad presentation
Swapnil Mahajan
 
PDF
Massimo Artizzu - The tricks of Houdini: a magic wand for the future of CSS -...
Codemotion
 
PDF
1. Which of the following statements would correctly print out t.pdf
ezzi97
 
Chrome DevTools
Blake Newman
 
Maharashtra state board Hsc IT Chap 3.pdf
AAFREEN SHAIKH
 
8.-Javascript-report powerpoint presentation
JohnLagman3
 
Chrome DevTools 101
Juan Obando
 
Lt web quiz_answer
0983676660
 
V8 javascript engine for フロントエンドデベロッパー
Taketoshi 青野健利
 
Silverlight 2 For Developers
Mithun T. Dhar
 
"Why is there no artificial intelligence yet?" Or, analysis of CNTK tool kit ...
PVS-Studio
 
NodeJS for Beginner
Apaichon Punopas
 
Price of an Error
Andrey Karpov
 
Yogesh kumar kushwah represent’s
Yogesh Kushwah
 
Full-Stack JavaScript with Node.js
Michael Lehmann
 
JavaScript Multithread or Single Thread.pptx
RAHITNATH
 
Diagrama de secuencia
Diego Arturo Lugo Oceguera
 
Auto cad 2006_api_overview
scdhruv5
 
Sanwaad presentation
Swapnil Mahajan
 
Massimo Artizzu - The tricks of Houdini: a magic wand for the future of CSS -...
Codemotion
 
1. Which of the following statements would correctly print out t.pdf
ezzi97
 
Ad

More from Vivek Kumar (6)

PPTX
JavaScript operators
Vivek Kumar
 
PPTX
JavaScript precedence
Vivek Kumar
 
PPTX
Java script assignment operators
Vivek Kumar
 
PPTX
Variables and datatypes in javascript
Vivek Kumar
 
PPTX
Short Story writting class 10
Vivek Kumar
 
PPTX
Writing skills
Vivek Kumar
 
JavaScript operators
Vivek Kumar
 
JavaScript precedence
Vivek Kumar
 
Java script assignment operators
Vivek Kumar
 
Variables and datatypes in javascript
Vivek Kumar
 
Short Story writting class 10
Vivek Kumar
 
Writing skills
Vivek Kumar
 

Recently uploaded (20)

PDF
Cryptography and Information :Security Fundamentals
Dr. Madhuri Jawale
 
PPTX
Edge to Cloud Protocol HTTP WEBSOCKET MQTT-SN MQTT.pptx
dhanashri894551
 
PPTX
ANIMAL INTERVENTION WARNING SYSTEM (4).pptx
dodultrongaming
 
PDF
BRKDCN-2613.pdf Cisco AI DC NVIDIA presentation
demidovs1
 
PPTX
easa module 3 funtamental electronics.pptx
tryanothert7
 
PPTX
EE3303-EM-I 25.7.25 electrical machines.pptx
Nagen87
 
PDF
Unit I Part II.pdf : Security Fundamentals
Dr. Madhuri Jawale
 
PPT
SCOPE_~1- technology of green house and poyhouse
bala464780
 
PPTX
Module_II_Data_Science_Project_Management.pptx
anshitanarain
 
PDF
LEAP-1B presedntation xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
hatem173148
 
PDF
6th International Conference on Artificial Intelligence and Machine Learning ...
gerogepatton
 
PDF
Introduction to Ship Engine Room Systems.pdf
Mahmoud Moghtaderi
 
PDF
EVS+PRESENTATIONS EVS+PRESENTATIONS like
saiyedaqib429
 
PPTX
Fluid Mechanics, Module 3: Basics of Fluid Mechanics
Dr. Rahul Kumar
 
PPTX
Civil Engineering Practices_BY Sh.JP Mishra 23.09.pptx
bineetmishra1990
 
PDF
Queuing formulas to evaluate throughputs and servers
gptshubham
 
PDF
2010_Book_EnvironmentalBioengineering (1).pdf
EmilianoRodriguezTll
 
PPTX
IoT_Smart_Agriculture_Presentations.pptx
poojakumari696707
 
PDF
FLEX-LNG-Company-Presentation-Nov-2017.pdf
jbloggzs
 
PPTX
TE-AI-Unit VI notes using planning model
swatigaikwad6389
 
Cryptography and Information :Security Fundamentals
Dr. Madhuri Jawale
 
Edge to Cloud Protocol HTTP WEBSOCKET MQTT-SN MQTT.pptx
dhanashri894551
 
ANIMAL INTERVENTION WARNING SYSTEM (4).pptx
dodultrongaming
 
BRKDCN-2613.pdf Cisco AI DC NVIDIA presentation
demidovs1
 
easa module 3 funtamental electronics.pptx
tryanothert7
 
EE3303-EM-I 25.7.25 electrical machines.pptx
Nagen87
 
Unit I Part II.pdf : Security Fundamentals
Dr. Madhuri Jawale
 
SCOPE_~1- technology of green house and poyhouse
bala464780
 
Module_II_Data_Science_Project_Management.pptx
anshitanarain
 
LEAP-1B presedntation xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
hatem173148
 
6th International Conference on Artificial Intelligence and Machine Learning ...
gerogepatton
 
Introduction to Ship Engine Room Systems.pdf
Mahmoud Moghtaderi
 
EVS+PRESENTATIONS EVS+PRESENTATIONS like
saiyedaqib429
 
Fluid Mechanics, Module 3: Basics of Fluid Mechanics
Dr. Rahul Kumar
 
Civil Engineering Practices_BY Sh.JP Mishra 23.09.pptx
bineetmishra1990
 
Queuing formulas to evaluate throughputs and servers
gptshubham
 
2010_Book_EnvironmentalBioengineering (1).pdf
EmilianoRodriguezTll
 
IoT_Smart_Agriculture_Presentations.pptx
poojakumari696707
 
FLEX-LNG-Company-Presentation-Nov-2017.pdf
jbloggzs
 
TE-AI-Unit VI notes using planning model
swatigaikwad6389
 

Console in javaScript