This question has already been answered:

"use strict" can be removed on the site and used only in development?

The question is not about what is "use strict", the question of whether it is needed in a ready-made script or is it sufficient to use it at the design stage.

Reported as a duplicate by Grundy , cheops , aleksandr barakin , VenZell , fori1ton May 27 '16 at 8:15 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

  • 2
    What is it for? - D-side
  • And who forbids? - edem
  • There seems to be a bit of a change in behavior in some places, so it’s better not to - andreymal

1 answer 1

The "use strict" directive is needed for compatibility with the ES5 standard, so if you use new features from ES5, then for the correct operation of the scripts on the site it cannot be removed. Just be careful - if you need to support IE8, then this directive does not work in it.

  • one
    "new" features from ES5) - Duck Learns to Hide
  • Well, I meant in relation to the earlier standard - Ivan Frolov
  • this is understandable, but it still makes you smile, while in a third of es6 in production, another third is transferred with different success - Duck Learns to Hide
  • Are you sure that the "strict" directive is needed for compatibility with the ES5 standard ? Can you support this statement with something? - Grundy
  • @Grundy explain in simple terms: is it needed in the finished project or not? - user208916