Code highlights logo



Introduction to Objects

Imagine you have a box where you can keep all sorts of things: names, numbers, and even your yes/no questions. In the world of computer code, we call this box an "object."

JavaScript, which is a computer language, really likes to use these boxes. We can put things inside an object, like:

  • Words or names, which we call "strings."
  • Numbers, just like the ones you count.
  • True or false answers, which we call "booleans."
  • A special thing called "null" that means there's nothing there.
  • "Undefined," when we haven't put anything in the box yet.
  • "Symbols," which are like secret codes.

An object can hold all these things and can also do actions. Learning JavaScript is like learning to pack your own boxes with things and instructions. And soon, you'll be able to make your own boxes for anything you can think of!

Sign up to start coding

Already have an account?

Sign In

Course content