Essential JavaScript
Introduction
JavaScript Basics
Numbers
Strings
Logic
Variables
Loops
Objects
Arrays
Arrays Intro
Making Arrays
Array Builder Kata
Array Elements
Human Names Kata
Array Length
Longest Array Kata
Looping Over Arrays
Highest Number Kata
Word Hunter Kata
Array Average Kata
Min-Max Kata
Adding Elements
Number Range Kata
Removing Elements
Arrays of Objects
Biggest Animal Kata
Arrays of Arrays
Taboo Words Kata
Going Further
Essential JavaScript
Introduction
JavaScript Basics
Numbers
Strings
Logic
Variables
Loops
Objects
Arrays
Arrays Intro
Making Arrays
Array Builder Kata
Array Elements
Human Names Kata
Array Length
Longest Array Kata
Looping Over Arrays
Highest Number Kata
Word Hunter Kata
Array Average Kata
Min-Max Kata
Adding Elements
Number Range Kata
Removing Elements
Arrays of Objects
Biggest Animal Kata
Arrays of Arrays
Taboo Words Kata
Going Further
Intro to Objects
We are going to learn how to work with objects, but first want to show you a quick example:
const person = { firstName: 'John', lastName: 'Doe', age: 22, };
Above, we see a variable person
that contains an object.
Objects are a way to group related pieces of information into a single place so they are easier to work with.
Until now, we could have three separate variables to represent the object above:
const firstName = 'John'; const lastName = 'Doe'; const age = 22;
Now we can encapsulate those values into an object and store it in a single variable.
Learning Goals
I can recognize an object in JavaScript code
I can see how objects make it easier to organize and work with values that belong together
Code Editor
Click "Run Code" to execute your JavaScript in a secure sandbox and see the output below.
Console Output
// Console output will appear here...
0 output lines