Strict Mode in JavaScript

Writing Cleaner JS Code


I have been writing my recent blog posts to reflect the ways in which I am trying to clean up and make my JS code more readable. One of those ways I want to talk about in this blog post is implementing “strict mode” into your code.

Strict mode in JavaScript is a literal expression that you add into your code that lets the compiler know to execute your code in “strict mode”. To use “strict mode”, you can place the expression, “use strict” at the beginning of your code so that…



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store