Coding / Programming Videos

Post your favorite coding videos and share them with others!

Javascript Print To Console Tutorial: Different ways to output data to the console

In this tutorial, you will learn the really simple function to use JavaScript to print to the console of your web browser.

Don’t forget to subscribe to the Junior Developer Central channel for more videos and tutorials!

Don’t forget to subscribe to the channel for more JavaScript Snippets!

Check out the rest of the JavaScript Snippets series here:

Even though this is a simple task there are a few other things you can use within your JavaScript code to print to the console.

First of all, you will also learn how to print a variable to the console with JavaScript.

You will also learn about some of the other ways of printing to the console with JavaScript.

These include using the console.warn() function, the console.info() function, and console.error() function.

The console.warn() function will allow you to send a notification to the console with JavaScript with an exclamation mark (at least when using JavaScript to print to the console with Chrome) to notify the user that there is something that might need attention.

The console.info() function is basically a replica of the console.log() function but it can be useful to use in your code to differentiate between warnings, errors, and informative messages.

Finally the console.error() function can be used to create a message which stands out in the console and is predominantly used to notify other developers or users that something went wrong and needs fixing.

As a final way to print to the console, you will learn about the console.table() function which is a handy way to format arrays and objects on the console for debugging purposes.

Other videos in the JavaScript Snippets series:
Find the largest number in an array JavaScript Tutorial: https://youtu.be/fOFSmCjvcFY
How to find the longest word in a String with JavaScript: https://youtu.be/j9cAav7VIv4
How to reverse a String in JavaScript Tutorial: https://youtu.be/k7zzWvQaEhc
Javascript String Length: How to determine the size of a string: https://youtu.be/OO0_9gq8NNI
JavaScript join method: How to merge arrays into one value: https://youtu.be/90MVWda5DlM
JavaScript How To Remove An Item From Array Tutorial: https://youtu.be/UvohHcj9I-s
Javascript How To Convert String To Number Tutorial: https://youtu.be/K-Twvsg3K_M
JavaScript Create HTML Element: How to dynamically add tags to your pages: https://youtu.be/VsXCK_2DJzA
JavaScript String Contains: How to check a string exists in another: https://youtu.be/uLT9iPccVZs
Link JavaScript to HTML: How to run your JavaScript code in the browser: https://youtu.be/821C5aJ3SLM
JavaScript Copy Array: How to make an exact copy of an array in JavaScript: https://youtu.be/5rybkWfeh-A
JavaScript Capitalize First Letter: How to make strings and arrays sentence case: https://youtu.be/8IEI-7fj2j4
Javascript Print To Console Tutorial: Different ways to output data to the console: https://youtu.be/pkFbigsR7jI

Bookmark(0)
 

1
Leave a Reply

Please Login to comment
1 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
1 Comment authors
expertdigi Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
expertdigi
Member
expertdigi

This post is very simple to read and appreciate without leaving any details out. Great work!
Please check this Data Science Course in Pune

 
Translate »