JavaScript: Best Practices for Data
1h 25mIntermediate2020-04-13
Authors

Sasha Vodnik
Principal Technical Course Developer at DocuSign
Course details
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
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
Skills covered
JavaScriptOracleProgramming LanguagesSoftware DevelopmentDeep Dive (X:Y)
Concepts
0. Introduction
- 01 - Working effectively with JavaScript data
- 02 - What you should know
- 03 - Setting up your environment
1. Why Best Practices
- 04 - Understanding style guides
- 05 - Using modern deployment tools
- 06 - Understanding ESLint
- 07 - Foundational practice - Always use strict mode
2. Declaring Variables
- 08 - Prefer const, then let
- 09 - 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
3. Assigning Values
- 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
4. Type Casting
- 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
5. Comparing Values
- 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
Conclusion
- 34 - Next steps
Related courses
- Crossfilter for Data Science Essential Training
- Data Structures in JavaScript: BSTs, Queues, and Stacks
- JavaScript: Building Linked Lists Data Structures
- jQuery for Web Designers
- Express Essentials: Build Powerful Web Apps with Node.js
- JavaScript: Security Essentials (2019)
- JavaScript: Security Essentials
- React.js Essential Training