HexLibraryHexLibrary
</> HexCodeSign inSign up
PythonJavaScriptTypeScriptCC++JavaPHPGoRustRubyBashSQLLuaPerlCOBOLPascalDelphiFortranDartSwiftC#JuliaGroovyRElixirHaskellKotlinScalaClassic ASPClipperMS-DOS
LESSONS
Introduction to JavaScriptVariables (let / const)Data TypesOperatorsStringsArraysObjectsConditions (if / else)Loops (for / while)FunctionsArrow Functions (=>)Array Methods (map / filter / reduce)
REFERENCE
📖 Overview
🖥️ Output & Console
console.log()Template literal ( `` )typeof
📦 Variables
🔢 Numbers & Math
✍️ String
📋 Array
🗂️ Object
🔁 Condition & Loop
🧩 Function
🔄 Type & Conversion
JavaScript›REFERENCE›Output & Console›console.log()

console.log()

Writes value(s) to the console.

Syntax

console.log(value1, value2, ...)

Description

Writes the values inside the parentheses to the output; if you provide multiple separated by commas, it puts spaces between them. It's the main tool for debugging and showing results.

Parameters

valueOne or more values to print.

Returns

Returns nothing (undefined); writes to the console.

Example

Loading editor…

Expected output

Hello World
3

When to use?

Do not show results, monitor variable values, debugging.

Common mistakes

  • ⚠️ In the browser, console.log output appears in the developer console (F12), not on the page.

Related commands

Template literal ( `` )typeof
Template literal ( `` ) →
HexLibraryHexLibrary

Learn programming more clearly. Every command is explained line by line with colors, reinforced with runnable exercises, test your code instantly — all in one place, free.

Learn

  • Home
  • Languages & Lessons
  • HexCode

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Use

Other Projects

  • HexToolz
  • Free Service Manuals
© 2026 HexLibrary · The clearest way to learn code