SlideShare a Scribd company logo
LOGGING
IN JAVASCRIPT
PART 1
console:
The console is part of the window object that
gives you access to the browser’s console. It
lets you output strings, arrays, and objects
that help debug your code.,
window.console.log("Hello World!");
console.log("I’m a JS Nugget!");
// Hello World!
// I’m a JS Nugget!
We can get access to the console in one of two
ways:
logging:
The most common element of the console object is
console.log(). For most scenarios, you’ll use it
to get the job done.
There are four different ways of outputting a
message to the console:
log
info
warn
error
Where console.error and console.warn outputs to
stderr, the others output to stdout.
examples:
log
info
warn
error
STAY AROUND FOR
OTHER TRICKS!
That you can play around with console, in the
forthcoming parts.

More Related Content

DOCX
New ecr user manual
PDF
Learn to Write ur first Shell script
PPTX
Docker 101
PPT
Shell scripting - By Vu Duy Tu from eXo Platform SEA
PDF
Chicago Elixir - Elixir Intro
PDF
IPython from 30,000 feet
PPT
Intro_Unix_Ppt
ODP
Mule ESB : ssh connector
New ecr user manual
Learn to Write ur first Shell script
Docker 101
Shell scripting - By Vu Duy Tu from eXo Platform SEA
Chicago Elixir - Elixir Intro
IPython from 30,000 feet
Intro_Unix_Ppt
Mule ESB : ssh connector

More from Ideas2IT Technologies (20)

PDF
Version comaparison in JavaScript
PDF
Currying in JavaScript
PDF
JS Testing Frameworks
PDF
Cool usage of Encoding and Decoding a URI in Javascript
PDF
Iterables and Iterators in JavaScript
PDF
String comparison in javascript
PDF
JavaScript symbols
PDF
Json.parse() in JavaScript
PDF
Bubble sort in Java Script
PDF
Performance analysis in merging arrays - JavaScript
PDF
Nullish coalescing in JavaScript
PDF
Conditionally add keys in JavaScript
PDF
What is Big O in JavaScript - Part-1
PDF
Variable hoisting in JavaScript
PDF
Formidable ES6 spread operator in JavaScript
PDF
Logging in JavaScript - Part-5
PDF
Logging in JavaScript - Part-4
PDF
Logging in JavaScript - Part-3
PDF
Logging in JavaScript - part-2
PDF
Array vs set in JavaScript
Version comaparison in JavaScript
Currying in JavaScript
JS Testing Frameworks
Cool usage of Encoding and Decoding a URI in Javascript
Iterables and Iterators in JavaScript
String comparison in javascript
JavaScript symbols
Json.parse() in JavaScript
Bubble sort in Java Script
Performance analysis in merging arrays - JavaScript
Nullish coalescing in JavaScript
Conditionally add keys in JavaScript
What is Big O in JavaScript - Part-1
Variable hoisting in JavaScript
Formidable ES6 spread operator in JavaScript
Logging in JavaScript - Part-5
Logging in JavaScript - Part-4
Logging in JavaScript - Part-3
Logging in JavaScript - part-2
Array vs set in JavaScript
Ad

Recently uploaded (20)

PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
System and Network Administraation Chapter 3
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
Online Work Permit System for Fast Permit Processing
DOCX
The Five Best AI Cover Tools in 2025.docx
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Become an Agentblazer Champion Challenge Kickoff
PDF
System and Network Administration Chapter 2
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
ai tools demonstartion for schools and inter college
PPTX
Introduction to Artificial Intelligence
PPTX
What to Capture When It Breaks: 16 Artifacts That Reveal Root Causes
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Build Multi-agent using Agent Development Kit
PPTX
Mastering-Cybersecurity-The-Crucial-Role-of-Antivirus-Support-Services.pptx
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
System and Network Administraation Chapter 3
Upgrade and Innovation Strategies for SAP ERP Customers
Online Work Permit System for Fast Permit Processing
The Five Best AI Cover Tools in 2025.docx
How to Choose the Right IT Partner for Your Business in Malaysia
Understanding Forklifts - TECH EHS Solution
Become an Agentblazer Champion Challenge Kickoff
System and Network Administration Chapter 2
VVF-Customer-Presentation2025-Ver1.9.pptx
PTS Company Brochure 2025 (1).pdf.......
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Which alternative to Crystal Reports is best for small or large businesses.pdf
ai tools demonstartion for schools and inter college
Introduction to Artificial Intelligence
What to Capture When It Breaks: 16 Artifacts That Reveal Root Causes
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Build Multi-agent using Agent Development Kit
Mastering-Cybersecurity-The-Crucial-Role-of-Antivirus-Support-Services.pptx
Ad

Logging in JavaScript - part-1

  • 2. console: The console is part of the window object that gives you access to the browser’s console. It lets you output strings, arrays, and objects that help debug your code., window.console.log("Hello World!"); console.log("I’m a JS Nugget!"); // Hello World! // I’m a JS Nugget! We can get access to the console in one of two ways:
  • 3. logging: The most common element of the console object is console.log(). For most scenarios, you’ll use it to get the job done. There are four different ways of outputting a message to the console: log info warn error Where console.error and console.warn outputs to stderr, the others output to stdout.
  • 5. STAY AROUND FOR OTHER TRICKS! That you can play around with console, in the forthcoming parts.