JavaScript: Best Practices for Data
Offered By: LinkedIn Learning
Course Description
Overview
Learn best practices for keeping your JavaScript application’s data and data structures clean, uncluttered, and efficient.
Syllabus
Introduction
- Working effectively with JavaScript data
- What you should know
- Setting up your environment
- Understanding style guides
- Using modern deployment tools
- Understanding ESLint
- Foundational practice: Always use strict mode
- Prefer const, then let
- Use individual statements to create variables
- Create descriptive variable names
- Standardize acronym case
- Remove unused variables
- Challenge: Declare variables
- Solution: Declare variables
- Don't assign variables in chains
- Standardize quotes
- Create arrays and objects using literals
- Quote object property names consistently
- Challenge: Assign values
- Solution: Assign values
- Type cast strings with the String wrapper
- Type cast numbers with the Number wrapper
- Type cast Booleans using double negation
- Rely on implicit Boolean values in conditionals
- Challenge: Type cast
- Solution: Type cast
- Use triple-character equality operators
- Don't use Yoda conditions
- Compare appropriately for the data type
- Use ternary statements judiciously
- Add parentheses to clarify logic
- Challenge: Compare values
- Solution: Compare values
- Next steps
Taught by
Sasha Vodnik
Related Courses
Create Mockups for a Website Homepage in Adobe XDCoursera Project Network via Coursera Create an Online Portfolio
CreativeLive Propiedad intelectual: de la idea al universo de las marcas
Domestika CSS: Design Systems and Architectures
LinkedIn Learning Developing a Style Guide
LinkedIn Learning