YoVDO

JavaScript: Best Practices for Data

Offered By: LinkedIn Learning

Tags

Javascript Courses Data Structures Courses Style Guides Courses ESLint Courses

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
1. Why Best Practices?
  • Understanding style guides
  • Using modern deployment tools
  • Understanding ESLint
  • Foundational practice: Always use strict mode
2. Declaring Variables
  • 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
3. Assigning Values
  • 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
4. Type Casting
  • 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
5. Comparing Values
  • 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
Conclusion
  • Next steps

Taught by

Sasha Vodnik

Related Courses

Create Mockups for a Website Homepage in Adobe XD
Coursera 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