First time I am saying thanks to any youtuber. Thanks a lot.
@evanc8057 Жыл бұрын
I have been coding with JS for 4 years and I had no idea that you could do this. So incredibly useful, thank you!
@gbbarn6 ай бұрын
Lol I've been coding for Js for close to 2 months and run into the necessity or creating functions that accepts an undefined number of parameters, like params in c# to put arguments into an array, but ended up learning rest parameters, I just love how ambiguous ECMAScript is!!! How did you survive 4 years without the use of rest params xD
@kshitijnegi8151 Жыл бұрын
Its good to learn JS from Telusko as you get to know how he also compares the syntax with JAVA and other languages.
@TinyMaths Жыл бұрын
Just discovering your channel. Thanks for the clear explanation. I was just covering this on the FreeCodeCamp curriculum. Nice video background by the way.
@ewlgirl Жыл бұрын
I have watched many video regarding this ,sir ,you are awesome,i got this concept easily
@ijajulislam72232 жыл бұрын
Awesome content..keep going sir
@-UPH-KRISHNAM2 жыл бұрын
There is variable length arguments in python too sir, we use *args
@gbbarn6 ай бұрын
Good video! although you forgot to mention that you could rename your rest parameters, instead of ...args you could define it as ...extraElements, for readability sake, one should always do.
@Morexod9992 жыл бұрын
Very good exlpanation, very clearful
@rahul-java-dev2 жыл бұрын
Short and Clear 🙏🙏
@santhoshkumar-qi9bc2 жыл бұрын
In JavaScript using 3 dots in clone
@jamilvillones5020 Жыл бұрын
params in c#
@Mokhtarmrt Жыл бұрын
What is the difference between these 2 codes as the result is the same: function sum(a,b){ return a+b; } let result sum(4,5); console.log(result); AND function sum(a,b){ return a+b; } console.log(sum(4,5)); When should i declare a variable and when not? because i saw many of your videos and you declare variables everywhere without telling why we need to declare them. When should i use a variable in javascript and when not?
@mydoglovesyogurt Жыл бұрын
use a variable when you need to storage the result.
@et-mental-739611 ай бұрын
Don't you think this is more efficient: function sum(...args) { let sum = 0; for(let i = 0; i < arguments.length; i++) sum = sum + arguments[i]; return sum; }
@gbbarn6 ай бұрын
The rule of thumb is that less syntax is almost always better.