Exercises: Switch Statement - Javascript In Depth

  Рет қаралды 731

Tech with Nader

Tech with Nader

Күн бұрын

Пікірлер
@nicolaeadrianchirita2586
@nicolaeadrianchirita2586 3 ай бұрын
great teaching, thanks a lot.
@KRAKENBACK..
@KRAKENBACK.. Жыл бұрын
Thank you for the exercises and once again I appreciate you having us pull back knowledge and figure out that we can't use a typical for loop for Objects because they are non itterables, and we had to use a for of loop. My only trouble was I searched on google and it had me use a for in loop, and when I was trying to run the code Everything on exercise 2 would print out Not implemented yet, I also tried to do Object.values(enemy) instead of Object.values(enemies) but after watching your solution and figuring it out on my own afterwards I completely understand the process. Thank you again Nader for the exercise and the clear explanations they are very much appreciated.
@TechWithNader
@TechWithNader Жыл бұрын
You're very welcome! This is an important realization to have, nice work! I actually purposefully avoided the for-in loop and I encourage you to only use it for debugging and not in your daily code. You can see why later when we get to prototypes, but it's a bit dangerous in how it works internally 😊
@nobody20022
@nobody20022 6 ай бұрын
for exercise 3: we can also write like this const points = [3,4,1,0,1,5,6]; for (const point of points) { switch (true) { case point
@InsanEzln
@InsanEzln Жыл бұрын
Why can't we use 'or' like case 0 || 1 || 2 ? i tried and it does not work
@TechWithNader
@TechWithNader Жыл бұрын
Good question! Switch matches on primitives by type directly, so we have to list them all out explicitly but we can use fall through for this, for example: case 0: case 1: case 2: { console.log(“matches all 3”); break; }
@horrorfying2884
@horrorfying2884 2 жыл бұрын
do you know svelte?
@TechWithNader
@TechWithNader 2 жыл бұрын
I’ve used Svelte to build a couple small projects when it first came out to compare it to React but haven’t gotten a chance to use it recently 😃 I like the concept behind it though.
@horrorfying2884
@horrorfying2884 2 жыл бұрын
@@TechWithNader sounds good! was hoping you'd cover svelte someday but at least i have the javascript vids!
@TechWithNader
@TechWithNader 2 жыл бұрын
@@horrorfying2884 So many videos to make, so little time haha! Let me know if you have other ideas as I’m compiling all the feedback I receive to inform future content 😊
Generators - Javascript In Depth
43:18
Tech with Nader
Рет қаралды 2,2 М.
DNS, IP Addresses & Ports - Rest APIs In Depth
32:16
Tech with Nader
Рет қаралды 2 М.
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
Switch Statements | Javascript | Tutorial 18
9:12
Giraffe Academy
Рет қаралды 24 М.
Network Protocols - Rest APIs In Depth
33:14
Tech with Nader
Рет қаралды 1,8 М.
Building a todo app: before and after Verbs
26:07
Chris Morrell
Рет қаралды 1 М.
#23 How to use the Switch Statement | JavaScript Full Tutorial
10:55
Exercises: Custom Hooks - React In Depth
1:15:45
Tech with Nader
Рет қаралды 1,2 М.
Custom Hooks - React In Depth
36:29
Tech with Nader
Рет қаралды 1,2 М.
Deno Environment Setup - Rest APIs In Depth
33:59
Tech with Nader
Рет қаралды 2,1 М.
Advent of Code 2024 - Day 12 - Rust
30:15
Slimsy Beetle
Рет қаралды 37
#14 Switch Statement in JavaScript
7:58
Telusko
Рет қаралды 124 М.
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН