Counter (Closure - Day2) - Leetcode 2620 - JavaScript 30-Day Challenge

preview_player
Показать описание

Day 2 of Leetcode's 30 day javascript challenge with leetcode 2620. Today's topic is again closure.

0:00 - Read the problem
0:30 - Closure Solution
3:00 - Class Solution

leetcode 2620

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

Let's do this. I'm in for the 30-Day Challenge.
Looking forward learning JavaScript on the go. :) Hyper Hyper

dekroplay
Автор

4:20 don't forget the "new"
Line 23 should be const counter = new Counter(10)

jaywalk
Автор

I didn't realize these were released at 5:30 PM PST / 6AM IST. So I guess we did two of them today 😅

NeetCodeIO
Автор

Your channel has been a godsent. Thanks a bunch ;)

ДенисУстименко-ик
Автор

im newbie in JS, after thinking for 30mins I just give n++ then it works idk what i just did. thank u for explanation

bibobo
Автор

Thank you for explaining so nicely. Subscribed to you now :)

Ayan-M-Dev
Автор

How is it able to return 10? If the return statement is increasing the value by 1 (n++), how does the first call return 10 and not 11? I am having trouble understanding this part.

mightychondria
Автор

thank you got the time and energy put in the video. One sub from me

azaramirli
Автор

Day 2 of doing the 30-day challenge with neetcode!

vixguy
Автор

Hey neetcode! I got a question for you. What exactly is this course for? Is this just like your ordinary DS vids of python or is it specific for web development

infinitygod
Автор

@2:59 "incremention" when you mention incrementing it; also, when you're a computer programmer but talk like George Bush 😛

EzraSchroeder
Автор

forgot to use the word "new" when creating an instance of a class in JS!

leeroymlg
Автор

The class solution is easier and efficient

kimayapanash