Тёмный

FUNCTION OVERLOADING IN JAVASCRIPT 

Joel Codes
Подписаться 4,1 тыс.
Просмотров 4,9 тыс.
50% 1

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

 

7 сен 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 18   
@antonioquintero-felizzola5334
@antonioquintero-felizzola5334 3 года назад
Your solution will fail if we do doThing(null). Null is also an object in JS, as you klnow. Once in the method, execution will fall into the if statement and we'll end up having an error kinda "Cannot read property 'x' of null"
@JoelCodes
@JoelCodes 3 года назад
You are absolutely correct. I forgot to also check for null! The if should read: if (typeof x === 'object' && x != null) I have pinned your comment so others can be alerted to this potential bug. Cheers 🍻
@antonioquintero-felizzola5334
@antonioquintero-felizzola5334 3 года назад
@@JoelCodes Cheers 🍻
@jonathanurbina7775
@jonathanurbina7775 2 года назад
@@JoelCodes I think that by doing this your function can fail again because if I don't name the object keys like 'x' and 'y' your function will set doThing(undefined, undefined)
@kishoreandra
@kishoreandra 3 года назад
Thanks Joel for the content .... keep going 🙏🏻🤝
@JoelCodes
@JoelCodes 3 года назад
Thanks! I got more in the pipeline! Stay tuned! 👍🍻
@kishoreandra
@kishoreandra 3 года назад
@@JoelCodes 🔥much awaiting ...😀
@DevsLikeUs
@DevsLikeUs 3 года назад
Great explanation.
@JoelCodes
@JoelCodes 3 года назад
Thanks, friends! Cheers 🍻👍
@aroncanapa5796
@aroncanapa5796 2 года назад
Only video I've ever seen with 0 dislikes nice
@JoelCodes
@JoelCodes 2 года назад
There's still time 🤣
@404Negative
@404Negative Год назад
how to "simulate" operator overloading ?
@BenNewton999
@BenNewton999 3 года назад
Thanks for your videos. Curious what you are using to annotate VSCode?
@JoelCodes
@JoelCodes 3 года назад
Thanks for watching! Oh that's a neat little program called ZoomIt: docs.microsoft.com/en-us/sysinternals/downloads/zoomit
@transcendingthedyad5663
@transcendingthedyad5663 Год назад
hi, what's the extension your using to view the console log right next to the code. Thanks!
@user-wu4df4jx2i
@user-wu4df4jx2i Год назад
I want to know too
@stephenmooney7468
@stephenmooney7468 3 года назад
Joel can I have a request please! React testing!!
@JoelCodes
@JoelCodes 3 года назад
React videos are planned and so are testing vids. Have a few others in the pipeline, but soon!
Далее
Custom Array Sort Algorithms in JavaScript
5:56
Просмотров 2,7 тыс.
#12 - Can We Overload a Function in JavaScript?
13:33
Просмотров 3,5 тыс.
БЕЛКА РОЖАЕТ?#cat
00:22
Просмотров 436 тыс.
No BS TS #4 - Function Overloading in Typescript
10:01
What are Static methods in JavaScript
10:44
Просмотров 10 тыс.
JavaScript: How It's Made
10:54
Просмотров 879 тыс.
Function Overloading in TypeScript (I was wrong)
10:24
JavaScript Pro Tips - Code This, NOT That
12:37
Просмотров 2,5 млн
What are Classes, Objects, and Constructors?
4:22
Просмотров 143 тыс.
#15 - Function Overloading in Typescript
9:02
Просмотров 2,1 тыс.
БЕЛКА РОЖАЕТ?#cat
00:22
Просмотров 436 тыс.