Vinod Sai
Vinod Sai

Reputation: 2122

How to execute deno without strict mode ? Error: Uncaught SyntaxError: Identifier 'list' has already been declared

Getting error Uncaught SyntaxError: Identifier 'list' has already been declared

Can we execute deno without strict mode?

Searched online but there is no clear documentation.

Upvotes: 1

Views: 467

Answers (1)

Marcos Casagrande
Marcos Casagrande

Reputation: 40414

There isn't a way, since Deno uses ES6 Modules, and module code is always run in strict mode.

From MDN

ECMAScript 2015 introduced JavaScript modules and therefore a 3rd way to enter strict mode. The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.

Upvotes: 2

Related Questions