0

In some documentation for Javascript I have seen strict mode enabled with single quotes as:

'use strict';

Yet in other documentation I have seen strict mode enabled with double quotes as:

"use strict";

What is the correct way to enable strict mode and why?

EDIT: This question is not asking can I use single quotes, but rather what the generally accepted style is (single quotes or double quotes) and why that style is preferred.

1 Answers1

0

It's the same thing.Here you can find some more information: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode

To invoke strict mode for an entire script, put the exact statement "use strict"; (or 'use strict';) before any other statements.

Vais
  • 103
  • 1
  • 9