Skip to content

LaunchCodeEducation/flexpath-revisit-objects-and-arrays-exercises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flexpath-revisit-objects-and-arrays-exercises

Exercise overview

Now that you have the basics of JavaScript and working with JavaScript in the web down, we wanted to revisit some fundamental concepts and give you a deeper understanding of how to use them effectively in your programs.

These exercises will take a closer look at objects and arrays in JavaScript.

Getting Started

  1. Using Visual Studio Code, open the folder flexpath-revisit-objects-and-arrays-exercises wherever you saved it on your device.
  2. Then open the flexpath-revisit-objects-and-arrays-exercises/exercises folder. Inside are a collection of folders for each exercise. Exercise instructions are provided to you in .txt files in these folders.
  3. To test your code, you will open up your terminal, and navigate to the specific exercise_[number] folder inside of the larger exercises/ folder where you are working in, using the change directory command cd.
  4. You will then run the command node [filename].js to run whichever file in the folder you are working with, replacing [filename] in the command with the file's actual name.

Exercise solutions are in the /solution folder

Note:

For the first few exercises in this repository, we have included example JS code you can use to test your solutions.

But, after the first few exercises we don't provide it anymore.

As a Software Developer, you will have to both solve a problem given to you and come up with code on your own to test that your solution to that problem actually works.

This is an important skill to build, and it is vital to being able to do this job.

Therefore, we want you to start getting comfortable writing JavaScript code to test that your solutions work as intended.

 

Summary of JavaScript Concepts Covered in These Exercises

  1. Objects in JavaScript:

    • Understanding what objects are and how they serve as containers for key-value pairs.
    • Creating objects using object literals and the new keyword.
    • Object properties and methods, including how to add, update, and delete properties.
    • Reference types vs. primitive types and the implications for memory management.
    • Using Object.create to define custom prototypes.
    • Understanding how JavaScript uses prototypes and the prototype chain.
  2. Array Manipulation:

    • Creating arrays using literals and the Array constructor.
    • Adding and removing elements using push, pop, shift, and unshift.
    • Using splice and slice for modifying and extracting array elements.
    • Combining arrays with concat and the spread operator.
    • Cloning arrays and the concept of shallow vs. deep copying.
  3. Iteration Methods:

    • Using forEach, map, filter, and reduce for efficient array iteration and manipulation.
    • Understanding the power and use cases for these methods compared to traditional for loops.
  4. Prototypes and Inheritance:

    • How objects inherit properties and methods from their prototypes.
    • The difference between object-oriented principles and JavaScript’s prototype-based inheritance.
    • The use of Object.defineProperty and property descriptors to control object properties.
  5. Advanced Topics:

    • Memory management with stack and heap.
    • Concepts like object freezing with Object.freeze and sealing with Object.seal.
    • Enumerability, property attributes, and protecting object properties.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published