DEV Community

keepoSteepo
keepoSteepo

Posted on

1 1

Breakpoints & Strict Mode

BREAKPOINTS AND STRICT MODE

Breakpoints are locations where the browser will pause the program, this enables the programmer to know if the error has occurred at that point of the script’s execution.

One can use breakpoints in the Google Chrome browser on a Mac by first right clicking on the page and then going to “Inspect”. On the line of code, to the left, there are three dots. Once clicked, after the options appear, proceed to “Break on” and select from the available options.

The purpose of using breakpoints when debugging your code is so that you can systematically figure out where the error in your code is. Since the code will only be run until the breakpoint, one can then progressively debug code.

Strict mode forces JavaScript to strictly apply syntax rules. The use of strict mode enables the script to run faster and more efficiently. It also encourages good programming technique since syntax error will result in load-time or run-time errors.

The way to run strict mode is by inputting the “use strict”; statement on the first line of the file.

SurveyJS custom survey software

JavaScript UI Libraries for Surveys and Forms

SurveyJS lets you build a JSON-based form management system that integrates with any backend, giving you full control over your data and no user limits. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs