About us

Learning library

For all the self-taught geeks out there, here our content library with most of the learning materials we have produces throughout the years.

It makes sense to start learning by reading and watching videos about fundamentals and how things work.

Machine Learning Engineering (16 weeks)

Full-Stack Software Developer

Search from all Lessons

Social & live learning

The most efficient way to learn: Join a cohort with classmates just like you, live streams, impromptu coding sessions, live tutorials with real experts, and stay motivated.

From zero to getting paid as a developer, learn the skills of today and tomorrow. Boost your professional career and be hired by a technology company.

Start Coding

← Back to Lessons
Edit on Github

Javascript Objects

Let’s review Objects in a bit more detail.

️Do not explain classes yet, just javascript simple object literals.

Objects are like a group of functions that together have a greater purpose. E.g: In real life, a car has a bunch of functionalities that together make them a car: - A car can accelerate, break, turn on the engine, turn off the engine, etc. - A car also has shared properties (not only functions), a car is red with a serial number with 4 tires and many other properties.

This will be a Javascript Representation of a car object:

1let car = { 2 color: 'red', 3 serialNumber: 'AKF345', 4 numberOfTires: 4, 5 currentSpeed: 0, 6 accelerate: function(delta){ 7 this.currentSpeed = this.currentSpeed + delta; 8 }, 9 break: function(delta){ 10 this.currentSpeed = this.currentSpeed - delta; 11 } 12}

To access or set an object’s properties, you can do so in the following ways:

1// to set a proparty value 2objectName.propertyName = valueToSet; 3objectName['propertyName'] = valueToSet; //alternate way 4 5//or to retrieve a propery value 6let anyVariable = objectName.propertyName; 7let anyVariable = objectName['propertyName']; //alternate way