JavaScript: Best Practices for Data

JavaScript: Best Practices for Data

English | MP4 | AVC 1280×720 | AAC 48KHz 2ch | 1h 24m | 210 MB

You know you want to write JavaScript code for maximal consistency, maintainability, and comprehensibility. Logic is one thing—data is another. This course explores the tools and approaches for keeping your data and data structures clean, uncluttered, and efficient. Instructor Sasha Vodnik introduces best practices from industry-standard style guides and introduces tools that will help you flag deviations as well as format code as you write it. He discusses moderns strategies for creating and using variables, assigning values, typecasting values, and making comparisons. These are the techniques that experienced JavaScript programmers use to optimize the way their applications handle data and keep their code up to date with the latest standards.

Topics include:

  • Style guides
  • Modern deployment tools
  • Better ways to declare variables
  • Removing unused variables
  • Assigning values
  • Creating arrays and objects using literals
  • Typecasting strings, numbers, and Booleans
  • Comparing values appropriately
  • Adding parentheses to clarify logic
Table of Contents

1 Working effectively with JavaScript data
2 What you should know
3 Setting up your environment
4 Understanding style guides
5 Using modern deployment tools
6 Understanding ESLint
7 Foundational practice Always use strict mode
8 Prefer const, then let
9 Use individual statements to create variables
10 Create descriptive variable names
11 Standardize acronym case
12 Remove unused variables
13 Challenge Declare variables
14 Solution Declare variables
15 Don’t assign variables in chains
16 Standardize quotes
17 Create arrays and objects using literals
18 Quote object property names consistently
19 Challenge Assign values
20 Solution Assign values
21 Type cast strings with the String wrapper
22 Type cast numbers with the Number wrapper
23 Type cast Booleans using double negation
24 Rely on implicit Boolean values in conditionals
25 Challenge Type cast
26 Solution Type cast
27 Use triple-character equality operators
28 Don’t use Yoda conditions
29 Compare appropriately for the data type
30 Use ternary statements judiciously
31 Add parentheses to clarify logic
32 Challenge Compare values
33 Solution Compare values
34 Next steps