{"id":1161,"date":"2023-05-21T06:59:13","date_gmt":"2023-05-21T06:59:13","guid":{"rendered":"https:\/\/itnotes.apjsoftwares.com\/?p=1161"},"modified":"2023-05-21T06:59:13","modified_gmt":"2023-05-21T06:59:13","slug":"what-is-the-strict-mode-in-javascript-and-how-can-it-be-enabled","status":"publish","type":"post","link":"https:\/\/itnotes.apjsoftwares.in\/index.php\/2023\/05\/21\/what-is-the-strict-mode-in-javascript-and-how-can-it-be-enabled\/","title":{"rendered":"What is the \u2018Strict Mode in JavaScript, and how can it be enabled?"},"content":{"rendered":"\n<p>Strict Mode adds certain compulsions to JavaScript. Under the strict Mode, JavaScript shows errors for a piece of code, which did not show an error before, but might be problematic and potentially unsafe. Strict Mode also solves some mistakes that hamper the JavaScript engines from working efficiently.<\/p>\n\n\n\n<p>Strict mode can be enabled by adding the string literal \u201cuse strict\u201d above the file. This can be illustrated by the given example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">function myfunction() {\n    \"use strict;\"\n    var v = \"This is a strict mode function\";\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Strict Mode adds certain compulsions to JavaScript. Under the strict Mode, JavaScript shows errors for&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[23],"tags":[],"_links":{"self":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts\/1161"}],"collection":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/comments?post=1161"}],"version-history":[{"count":1,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts\/1161\/revisions"}],"predecessor-version":[{"id":1162,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts\/1161\/revisions\/1162"}],"wp:attachment":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/media?parent=1161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/categories?post=1161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/tags?post=1161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}