The Design Patterns video I mentioned: kzitem.info/news/bejne/1XeruIWpmJZqeW0
@brandonhyson9762
9 ай бұрын
I just have to say, the way you clearly explain every thought along the thought process is super impressive. The way you explain all of the variarions in which you can accomplish each area of the code within the task is very satisfying appreciate the effort
@zombiefacesupreme
3 ай бұрын
[4:15] Actually, you can use this inside of functions. That's how it was done for almost twenty years. In fact, classes are mostly just syntactic sugar around functions. function FactoryFunction(paramOne, paramTwo){ this.propOne = paramOne this.propTwo = paramTwo } FactoryFunction.prototype.methodOne = function(){ ++this.propOne } var instance = new FactoryFunction() Ta-da! super() is just sugar around the call method. function DerivedClass(paramOne, paramTwo, paramThree){ FactoryFunction.call(this, paramOne, paramTwo) this.propThree = paramThree } var derivedInstance = new DerivedClass()
@GodspowerEnemuwe
3 ай бұрын
Hey, do you have any recommendations where I can ACTUALLY learn JavaScript as a newbie, alongside Algorithm and Data structure (Free though, I'm broke).
@bhaviljainnnnnnn
2 ай бұрын
@@GodspowerEnemuwe may i know what do you mean by broke ? all good ?
@alirmzn
4 ай бұрын
Why shouldn't we use a basic for loop instead of for...in which adds another step for casting "i" to "Number(i)" ?
@Suviiii69
8 ай бұрын
Day 4 still strong 😭
@krateskim4169
Жыл бұрын
Awesome explanation
@Amar11115
Жыл бұрын
Greatly explained!
@hrachhovhannisyan4163
Жыл бұрын
Why are we using "for in"? For loop is faster
@TheMarkBrut
Жыл бұрын
best channel
@AryanSingh-iu9vt
Жыл бұрын
Hi! I am completely new to Competitive Programming. Can you please tell what software do you use to write the code? And which language would you recommend for newbies like me?
@prabhg5276
Жыл бұрын
c++ probably is the best for competitive programming
@AhmadMaartmesrini
Ай бұрын
thanks
@uptwist2260
Жыл бұрын
Love these videos
@hrachhovhannisyan4163
Жыл бұрын
This variant is faster and guaranteed var map = function (arr, fn) { if (arr.length === 0) { return []; } const transformedArray = new Array(arr.length); for (let i = 0; i < arr.length; i++) { transformedArray[i] = fn(arr[i], i); } return transformedArray; };
@vixguy
Жыл бұрын
Day 4 of doing the 30-day challenge with NeetCode!
@shivasai7707
9 ай бұрын
Hey neetcode why didn't you cast i into number in arr[i] great content btw
@Aashiqui-pf7ni
5 ай бұрын
good
@pastori2672
8 ай бұрын
6:40 why does he have to cast Number(i) because it returns a string but when indexing the array with "i" he doesnt cast it to a number ?
@souravhianl3927
7 ай бұрын
because i is returning a string while arr[i] is returning the value present at that index
@pastori2672
7 ай бұрын
@@souravhianl3927 that was not my question i just didnt know you could access element by strings like "1", "2".. because they're strings but now i get it i appreciate it anyways tho 👍
@saikosam8032
4 күн бұрын
You can assign a value to a string key on an array, but this does not count as an array element; instead, it is treated as an object property: let arr = [10, 20, 30]; arr["key1"] = "value1"; // Adds a property with a string key console.log(arr["key1"]); // Outputs: "value1" console.log(arr.length); // Outputs: 3, because "key1" is not counted in the array length In JavaScript, array indices are typically numeric, meaning they are integers starting from 0. However, because arrays in JavaScript are objects, you can assign properties with string keys to an array. These properties act like object properties rather than true array elements.
@pastori2672
4 күн бұрын
@@saikosam8032 oh ok, thanks bro, what a monstrosity of a language tho
Пікірлер: 26