Strict mode fixes mistakes that make it difficult for JavaScript engines to

Strict mode fixes mistakes that make it difficult for

This preview shows page 28 - 39 out of 39 pages.

Strict mode fixes mistakes that make it difficult for JavaScript engines to perform optimizations: strict mode code can sometimes be made to run faster than identical code that’s not strict mode.
Image of page 28
COMP1073 - MODULE ONE - JAVASCRIPT INTRODUCTION JAVASCRIPT CAN BE STRICT Strict mode prohibits some syntax likely to be defined in future versions of ECMAScript. It prevents, or throws errors, when relatively “unsafe” actions are taken (such as gaining access to the global object). It disables features that are confusing or poorly thought out. Strict mode makes it easier to write “secure” JavaScript.
Image of page 29
COMP1073 - MODULE ONE - JAVASCRIPT INTRODUCTION LET’S SEE WHAT YOU KNOW? JavaScript helps our webpages become more dynamic
Image of page 30
COMP1073 - MODULE ONE - JAVASCRIPT INTRODUCTION LET’S SEE WHAT YOU KNOW? Client-side means our code runs on the server
Image of page 31
COMP1073 - MODULE ONE - JAVASCRIPT INTRODUCTION LET’S SEE WHAT YOU KNOW? JavaScript and Java are basically the same thing
Image of page 32
COMP1073 - MODULE ONE - JAVASCRIPT INTRODUCTION LET’S SEE WHAT YOU KNOW? It’s a good idea to keep the layers of our webpages (HTML, CSS, JavaScript) separate
Image of page 33
COMP1073 - MODULE ONE - JAVASCRIPT INTRODUCTION LET’S SEE WHAT YOU KNOW? Async and defer represent two different script loading strategies
Image of page 34
COMP1073 - MODULE ONE - JAVASCRIPT INTRODUCTION LET’S SEE WHAT YOU KNOW? We don’t have to worry about when the DOM finishes loading
Image of page 35
COMP1073 - MODULE ONE - JAVASCRIPT INTRODUCTION LET’S SEE WHAT YOU KNOW? If your scripts don't need to wait for parsing and can run independently without dependencies, then use defer.
Image of page 36
COMP1073 - MODULE ONE - JAVASCRIPT INTRODUCTION LET’S SEE WHAT YOU KNOW? This semester is going to be AWESOMESAUCE!
Image of page 37
COMP1073 - MODULE ONE - JAVASCRIPT INTRODUCTION PRACTICE TIME ! Work Through The Tutorial Found Here: A_first_splash We will discuss and review this tutorial together next week :) !
Image of page 38
COMP1073 - MODULE ONE - JAVASCRIPT INTRODUCTION NEXT WEEK Review Tutorial Variables, Operators & Strings Quiz One (2.5%)
Image of page 39

You've reached the end of your free preview.

Want to read all 39 pages?

  • Spring '19
  • scripting language

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture