Тёмный

Quick JavaScript Question 10: What Will This Code Output? (Rest Operator) 

Progosling
Подписаться 101
Просмотров 487
50% 1

In this video, I'm asking you a quick JavaScript question about the rest operator. Take a look at the code snippet and try to guess what it will output to the console! Leave your answers in the comments, and don't forget to like and subscribe to the channel if you enjoyed it. Thanks for watching!
#JavaScript #question #code #programming #learning #development #JavaScriptQuestion #CodeOutput #RestOperator #CodingChallenge #WebDevelopment

Опубликовано:

 

8 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 7   
@MLBPC
@MLBPC 2 месяца назад
So you’re creating an object with a list of key:values inside that cannot be modified by being set as a constant. We then are then creating a variable containing an object with a list? a, b. I’m not sure what .. rest is doing So output would be?? I think { a:10, b: 20 }
@progosling
@progosling 2 месяца назад
Check out the "Destructuring assignment" topic. This is what happens in this task. Then try another answer.
@A1rPun
@A1rPun 2 месяца назад
10 20 [30, 40] argh I failed it's 10 20 {c:30, d:40}
@progosling
@progosling 2 месяца назад
You were the first to give the correct answer. Congratulations.
@A1rPun
@A1rPun 2 месяца назад
@@progosling Thanks! To be fair I only got it after evaluating in nodejs
@parmardhruval0102
@parmardhruval0102 2 месяца назад
10 20 {30,40}
@progosling
@progosling 2 месяца назад
Not entirely true. The "rest" object has keys and values. This is not in your answer.
Далее
Spread and REST operators in Javascript
14:00
Просмотров 55 тыс.
C++ vs Rust: which is faster?
21:15
Просмотров 397 тыс.
Noam Chomsky - Why Does the U.S. Support Israel?
7:41
My 10 “Clean” Code Principles (Start These Now)
15:12
Become a bash scripting pro - full course
36:00
Просмотров 60 тыс.
Dependency Injection, The Best Pattern
13:16
Просмотров 840 тыс.
Tricky JavaScript interview questions and answers
21:01
Use Arc Instead of Vec
15:21
Просмотров 148 тыс.
12 VS Code Extensions to INCREASE Productivity 2024
27:13
10 JavaScript Interview Questions You HAVE TO KNOW
13:41
Must Know Javascript Interview Questions
6:10
Просмотров 109 тыс.
Dependency Injection | Prime Reacts
28:34
Просмотров 336 тыс.