JavaScript Basics
JavaScript Objects In real life, objects are things like: houses, cars, people, animals, or any other subjects. Object Properties car has properties like weight and color: car.name = Fiat, car.model = 500, car.weight = 850kg, car.color = white. Object Methods car has methods like start and stop: car.start(), car.drive(), car.brake(), car.stop(). JavaScript Variables JavaScript variables are containers for data values. let car = "Fiat"; JavaScript Objects Objects are variables too. But objects can contain many values. const car = {type:"Fiat", model:"500", color:"white"}; How to Define a JavaScript Object Using an Object Literal Using the new Keyword Using an Object Constructor object literal is a list of name:value pairs inside curly braces {}. {firstName:"John", lastName:"Doe", age:50, eyeColor:"blue"} // Create an Object const person = {firstName:"John", lastName:"Doe", age:50, eyeColor:"...