Skip to Main Content
Rediscovering JavaScript
book

Rediscovering JavaScript

by Venkat Subramaniam
June 2018
Beginner content levelBeginner
288 pages
6h 31m
English
Pragmatic Bookshelf
Content preview from Rediscovering JavaScript

Stay One Step Ahead

The traps we saw have been part of JavaScript for a long time. Even though the language has evolved considerably, these gotchas are inherent and they’re here to stay. Thankfully, we can make a preemptive strike to avert these issues using some tools and techniques.

Apply the use strict Directive

Placing ’use strict’; at the beginning of a JavaScript source file or within a function turns on the strict mode of execution. In this mode, the execution runtime does not tolerate, among other things, use of undeclared variables.

If the directive is placed at the top of a script, then all code in the script runs in the strict mode. If placed only within a function, then only the code within that function runs in the strict mode—the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Object-Oriented JavaScript - Third Edition

Object-Oriented JavaScript - Third Edition

Stoyan STEFANOV, Ved Antani
Deno Web Development

Deno Web Development

Alexandre Portela dos Santos

Publisher Resources

ISBN: 9781680506174Errata Page