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

Download Video link >



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.

Additional tags:

javascript print to console chrome,
javascript print to console without newline,
javascript print to console firefox,
javascript print to console log,
javascript print to console object,
javascript print to console eclipse,
javascript print to console safari,
javascript print to console internet explorer,
javascript print to console variable

source

Bookmark(0)
 

 

View Comments source >

Transcript view all >

00:00 so if you want to use javascript to

00:01 print the console of your web browser

00:03 you literally use console dot log and

00:05 then whatever it is that you want to

00:07 print a but if you want to learn about

Leave a Reply

Please Login to comment
  Subscribe  
Notify of
Translate »