Animations

API

Arrays

Async

Basics

Challenges

Classes

Console

Dates

Debugging

DOM Elements

DOM Methods

DOM Navigation

DOM Properties

Event Listeners

Flow Control

Forms

Functions

Global Functions

JSON

Keywords

Libraries (3rd party)

Math

Modules

Objects

Snippets

String

Types

Widgets

Window Object

JavaScript - Basics

You can place the debugger command in your code which will halt your program and require you to step through it. This only works if your Developer Console is open. If it is not, the browser will ignore the command.

  • Open Developer Console
  • Click button


function RunTest()
{
    let output = "";
    let demo1 = document.getElementById("demo1");
    for (let i = 0; i< 5; i++)
    {
        output +=`The number is ${i}<br />`;
        debugger;
    }
    demo1.innerHTML = output;
}