Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

LinkedIn Learning

JavaScript: Best Practices for Data

via LinkedIn Learning

Write review

No Longer Offered

Overview

Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
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

Reviews

4.8 rating at LinkedIn Learning based on 91 ratings

Start your review of JavaScript: Best Practices for Data

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.