Learn JavaScript NESTED OBJECTS easy! 📫

  Рет қаралды 9,836

Bro Code

Bro Code

Күн бұрын

Пікірлер: 10
@BroCodez
@BroCodez 10 ай бұрын
// nested objects = Objects inside of other Objects. // Allows you to represent more complex data structures // Child Object is enclosed by a Parent Object // Person{Address{}, ContactInfo{}} // ShoppingCart{Keyboard{}, Mouse{}, Monitor{}} class Person{ constructor(name, age, ...address){ this.name = name; this.age = age; this.address = new Address(...address); } } class Address{ constructor(street, city, country){ this.street = street; this.city = city; this.country = country; } } const person1 = new Person("Spongebob", 30, "124 Conch St.", "Bikini Bottom", "Int. Waters"); const person2 = new Person("Patrick", 37, "128 Conch St.", "Bikini Bottom", "Int. Waters"); const person3 = new Person("Squidward", 45, "126 Conch St.", "Bikini Bottom", "Int. Waters"); console.log(person1.name); console.log(person1.age); console.log(person1.address); console.log(person1.address.street); console.log(person1.address.city); console.log(person1.address.country);
@piotrmazgaj
@piotrmazgaj Ай бұрын
This is my seal. I have watched the entire video, understood it, and I can explain it in my own words, thus I have gained knowledge. This is my seal.
@gobicorner
@gobicorner 10 ай бұрын
played well
@saxa3495
@saxa3495 10 ай бұрын
Cool
@akj3388
@akj3388 7 ай бұрын
Can you insert an object into another object just like array.push method?
@visuals420
@visuals420 10 ай бұрын
You're a g bro
@STR-DP
@STR-DP 6 ай бұрын
37😄
@gobicorner
@gobicorner 10 ай бұрын
what's in bikini button inside objects inside object nice example
@Андреич-с4н
@Андреич-с4н 6 ай бұрын
Thanks, this is clear. Now I wanted to apply this to graphics. If I want to create a smile icon as an object and the eyes and the mouth to be nested objects so that the icon moves along X or Y or Z axis, or rotates, the eyes and mouth moves with it - how shall I approach this?
JavaScript ARRAYS of OBJECTS are easy! 🍎
10:01
Bro Code
Рет қаралды 20 М.
JavaScript GETTERS & SETTERS are awesome!!! 📐
13:14
Bro Code
Рет қаралды 16 М.
Win This Dodgeball Game or DIE…
00:36
Alan Chikin Chow
Рет қаралды 36 МЛН
HAH Chaos in the Bathroom 🚽✨ Smart Tools for the Throne 😜
00:49
123 GO! Kevin
Рет қаралды 15 МЛН
Learn JSON in 10 Minutes
12:00
Web Dev Simplified
Рет қаралды 3,2 МЛН
Javascript Objects Explained | Javascript Objects Tutorial
23:17
The JavaScript SUPER keyword is super! 🦸‍♂️
9:22
Bro Code
Рет қаралды 16 М.
Learn Closures In 13 Minutes
13:22
Web Dev Simplified
Рет қаралды 67 М.
What are NodeLists in JavaScript? 📃
13:22
Bro Code
Рет қаралды 9 М.
Understanding Passing by Reference or Value in JavaScript
13:17
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 7 М.
All Rust features explained
21:30
Let's Get Rusty
Рет қаралды 310 М.
Learn how JavaScript COOKIES work! 🍪
14:15
Bro Code
Рет қаралды 52 М.
Learn JavaScript ARROW FUNCTIONS in 8 minutes! 🎯
8:02
Bro Code
Рет қаралды 34 М.