Introduction to JavaScript – CONSOLE – Before you learn about data types and methods, you need to know how to print values to the console. The console.log() command is a tool that developers use to record the output of their JavaScript programs.

The console.log() command is used to print, or log, text to the console. Consider the following example:

 console.log("Hello!"); 

In this example code above, Hello! is logged to the console. Notice, we denote the end of the line with a semicolon. Although your code will usually run as intended without a semicolon, it is best practice to always include one to ensure your code works as expected in situations when it does need one.

You’ll see in the next exercise that you can put any data type inside the parentheses to print it to the console.



Related Links:

See the JavaScript Glossary on CONSOLE

My little pony learning game in VB.NET

Methods of teaching programming

JavaScript OutPut from W3Schools.com

Defining What anĀ Application Is

Hello World Android app built with Android Studio

JavaScript Comparison Operators

Introduction to Batch File Viruses

Android Studios

Online JavaScript Compiler. Code on the go.

JavaScript Glossary

Introduction to JavaScript – Control Flow: True and False values

Build to-do list web-app with code

Introduction to JavaScript – Libraries

Why do most sites use cookies?

Learn about Numpy Arrays in Python programming

Introduction to JavaScript – Variables: Review

Object-Oriented Programming (OOP)

Python Online Compiler Code on the Go

Who is this Android App Development course for?

Introduction to JavaScript – Create a Variable: let

Learn Python Hello World Program

What is a Batch file?

Adding Python Comments

Introduction to JavaScript – Variables: String Interpolation

Python Glossary

Learn Code Introspection Python Programming

FAQs