---
title: "What does \"use strict\" do in JavaScript, and what is the reasoning behind it?"  
description: "What does \"use strict\" do in JavaScript, and what is the reasoning behind it?"  
author: "Erick Wilsom"  
published: 2022-10-27  
updated: 2022-10-27  
canonical: https://www.mindstick.com/forum/157183/what-does-use-strict-do-in-javascript-and-what-is-the-reasoning-behind-it  
category: "javascript"  
tags: ["javascript", "node js", "reactjs"]  
reading_time: 1 minute  

---

# What does "use strict" do in JavaScript, and what is the reasoning behind it?

What does "use [strict](https://yourviews.mindstick.com/view/81367/usa-imposes-strict-ban-on-syria)" do in [JavaScript](https://www.mindstick.com/articles/874/how-to-create-watermark-text-for-textbox-by-using-javascript), and what is the [reasoning](https://www.mindstick.com/articles/342078/claude-design-how-modern-ai-assistants-are-built-for-safety-reasoning-and-usability) behind it?

## Replies

### Reply by Gourav Jangra

Strict Mode makes easier to write secure Javascript.Strict mode changes previously accepted bad syntax into real errors.

As an example, in normal JavaScript, mistyping a variable name creates a new global variable. In strict mode, this will throw an error, making it impossible to accidentally create a global variable.


---

Original Source: https://www.mindstick.com/forum/157183/what-does-use-strict-do-in-javascript-and-what-is-the-reasoning-behind-it

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
