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
How to Say It: Pattern Writing for KnittersCraftsy Create Mockups for a Website Homepage in Adobe XD
Coursera Project Network via Coursera Create an Online Portfolio
CreativeLive Figma UI UX Design Essentials
CreativeLive Advanced Grammar and Proofreading for Writers
DeAnza College via California Community Colleges System