5 JavaScript Functions You Should Know (But Most Don't!)

preview_player
Показать описание
Have you used these 5 JavaScript functions before? Did you know them already?

Prepping for your frontend interviews? Use code "conner" for a discount on my product FrontendExpert:

Timestamps:
0:00 Different Equality Check
1:27 Relative Time Formatters
2:46 Mathematical Sign
3:47 Array Flat Plus Map Pattern
6:26 Better Array Indices


Рекомендации по теме
Комментарии
Автор

Please zoom into the editor more, i can barely see the code without bringing my mobile close to my eyes.

Love your videos.

whonayem
Автор

negative zero is not really a javascript thing, it's an IEEE thing. Because of the way floating point number are encoded negative zero is a possible value.

soniablanche
Автор

or we can do Array.from(new Set(arr));

musaabdulmumeen
Автор

Zero and negative zero are very distinct and different numbers - when seen as Minecraft coordinates....

danielgilleland
Автор

From what I know, if you want good performance (for cases with 10k objects for example) - abandon all looping methods and instead do a straighforward, readable *for* loop. NOT *for of* loop either. For loops are my favourite, because I can see exactly what they do, I can add several counters and conditions, and I don't create excessive operations like looping to get values and then looping _once again_ to remove some values.

I use them all the time but most of the time I don't have that large of an array. Comes in handy though when I have to make loops inside loops (that's much more work than just two separate loops, they muttiply).

danser_theplayer
Автор

I still think the rtf functionality is quite weak. They should have done more.
I think the only one idk here is the flatmap.
But the video is ok, nonetheless.

asagiai
Автор

How to programing and log your result to output vscode like you?

NgocTran-dp