JavaScript SPREAD OPERATOR in 4 minutes! 📖

  Рет қаралды 46,763

Bro Code

Bro Code

Күн бұрын

Пікірлер: 36
@BroCodez
@BroCodez Жыл бұрын
// spread operator = ... allows an iterable such as an // array or string to be expanded // into separate elements // (unpacks the elements) // ------------- EXAMPLE 1 ------------- let numbers = [1, 2, 3, 4, 5]; let maximum = Math.max(...numbers); let minimum = Math.min(...numbers); console.log(maximum); // ------------- EXAMPLE 2 ------------- let username = "Bro Code"; let letters = [...username]; console.log(letters); // ------------- EXAMPLE 3 ------------- let fruits = ["apple", "orange", "banana"]; let vegetables = ["carrots", "celery", "potatoes"]; let foods = [...fruits, ...vegetables, "eggs", "milk"]; console.log(foods);
@swayampattanaik1522
@swayampattanaik1522 11 ай бұрын
greatest takeaway: ``unpacks the elements ``
@AngelCodes95
@AngelCodes95 Жыл бұрын
Thanks bro. Very helpful for us visual learners.
@powpud
@powpud 2 ай бұрын
i love you
@weslaycock466
@weslaycock466 10 күн бұрын
Thanks bro grateful this type of education exist and is freely available
@5upl1an
@5upl1an 6 ай бұрын
oh fuck yeah, *spread it*
@Learn__it_Simply
@Learn__it_Simply 5 ай бұрын
😂 yeah babe
@powpud
@powpud 2 ай бұрын
spread me
@1More_Dreamer
@1More_Dreamer 16 күн бұрын
when not even documentation makes me understand, I come here, and leave with pure knowledge
@piotrmazgaj
@piotrmazgaj 5 ай бұрын
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.
@feenixtm
@feenixtm 2 ай бұрын
Thanks Bro Code! :D
@milos2785
@milos2785 5 ай бұрын
GREAT! Thanks for explaining!
@ramonremz
@ramonremz 7 ай бұрын
ok yeah this is the perfect way of explaining it. thanks!
@khalidelgazzar
@khalidelgazzar Жыл бұрын
So good. Thanks!
@khalidelgazzar
@khalidelgazzar 16 күн бұрын
Great job 👍
@raikashifali1
@raikashifali1 5 ай бұрын
Big fan 🪭 Sir!! 😅. Big fan
@meghanam3948
@meghanam3948 6 ай бұрын
Next level
@xzex2609
@xzex2609 Жыл бұрын
When you've said "shallow copy" , I think it's like the shallow copy in python, which changing a copy, will change the original one , but when I pop()ed an item from new array and the original one stayed intact , so I got confused why they are called shallow ? is it mean that other dimensions in the array, are behaving differently like in python. or this shallow has nothing to do with that shallow copy concept we have in python?
@sayalimore1267
@sayalimore1267 10 ай бұрын
It has nothing to do with python. "Creates a shallow copy of an array" actually means to create the copy of elements present inside an iterable. We are not copying the array, but just spreading out or separating the elements without actually affecting the original array as both the arrays have different references pointing out. Hope this helps.
@xzex2609
@xzex2609 10 ай бұрын
thanks , it seems that is a copy of the existing array , independent of the original one.@@sayalimore1267
@baster7537
@baster7537 9 ай бұрын
Thank you soo much bro, You are always best.
@kathikr9360
@kathikr9360 10 ай бұрын
thank you
@siyapandey8799
@siyapandey8799 8 ай бұрын
Useful
@engineeringmentality8249
@engineeringmentality8249 Ай бұрын
awesome explanations
@asdsdfadfsa
@asdsdfadfsa 3 ай бұрын
3:08 isn't that a deep copy?
@shivamdohare8294
@shivamdohare8294 Ай бұрын
yeahh...same doubt
@hunin27
@hunin27 Жыл бұрын
ty bro
@xzex2609
@xzex2609 Жыл бұрын
Dear Bro , in the old days we used to use web page console, but if a program is just need a console and doesn't involve Html why you don't use vscode terminal , or output to log .it's way easier . I think by installing node.js we have console on the terminal. since this is your 2nd video teaching JS , and please like the other one make it around DOM , we don't want to play tic tac toe , I personally learn it just for front end web development , I prefer this way than learning flask
@DavidWTube
@DavidWTube 9 ай бұрын
Why the Spread Operator isn't three commas I'll never understand. (,,,spread)
@jhoelzeballoszelada4636
@jhoelzeballoszelada4636 8 ай бұрын
It looks visualy awful haha
@adamczarny6482
@adamczarny6482 Жыл бұрын
fucking game changer
@powpud
@powpud 2 ай бұрын
you too
@ShahidImtiaz-u2u
@ShahidImtiaz-u2u 8 ай бұрын
👍
@Nedigital__lol
@Nedigital__lol Жыл бұрын
Start of day 3💪🏼
@nihongo_
@nihongo_ 10 ай бұрын
W
@ice-o3i
@ice-o3i 5 ай бұрын
Let comment = Math.random();
JavaScript REST PARAMETERS in 8 minutes! 🗄
8:06
Bro Code
Рет қаралды 26 М.
Learn JavaScript CALLBACKS in 7 minutes! 🤙
7:17
Bro Code
Рет қаралды 77 М.
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
Why Is Array/Object Destructuring So Useful And How To Use It
13:24
Web Dev Simplified
Рет қаралды 433 М.
How is this Website so fast!?
13:39
Wes Bos
Рет қаралды 1,3 МЛН
JS Promises in 4 Minutes
3:51
CodeNexus
Рет қаралды 2,4 М.
FASTER JavaScript In 2025 With Sets
13:13
Jack Herrington
Рет қаралды 25 М.
JS Spread Operator: How It Works & Why I Love It
16:31
Colt Steele
Рет қаралды 76 М.
Dependency Injection, The Best Pattern
13:16
CodeAesthetic
Рет қаралды 911 М.
This is the Only Right Way to Write React clean-code - SOLID
18:23
...spread operator and rest operator - Beau teaches JavaScript
6:58
freeCodeCamp.org
Рет қаралды 155 М.
JavaScript FUNCTIONS are easy! 📞
12:14
Bro Code
Рет қаралды 53 М.
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН