Default parameters in javascript

preview_player
Показать описание
Welcome to a youtube channel dedicated to programming and coding related tutorials. We talk about tech, write code, discuss about cloud and devops. That’s what we do all day, all year. We roll out a lot of series and videos on our channel.

All the learning resources such as code files, documentations, articles and community discussions are available on our website:

You can find our discord link, github link etc on the above website.

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

you are the best javascript teacher....lots of thanks from Nepal

milankbudha
Автор

love you sir, for your care on sharing knowledge

pavantejavydhik
Автор

missing javascript yesterday so I read the documentation and made some small programs like Armstrong number identifier, prime number & perfect number identifier .enjoying learning from you sir

yashshende
Автор

Nice explanation...taken much time to explain simple default parameter..it is much simpler and take less time..

Travelmoments
Автор

Best man in the business, beautifully executed tutorial once again =)

reidwilliamson
Автор

Thank you! I had issues solving the syntax error of this,
___
(function UseDefaultParameters() {

// Correct the syntax errors in the function.
function hello(who) {
return 'Hello ' + who + '!';
}

// Don't make changes below this line

expect(hello()).toBe('Hello World!');
React!');

solved++;
})();
___

But you taught me that I could set the value of "who" to world by using " = 'World' "

Appreciate it! :)

EricMichaelLP
Автор

Thanks in a million. Great stuff on earth!

johng
Автор

since couple of weeks m working on achieving socket programing (audio/video/text instant chat app) In iOS but couldn't get thru, could you please help by making a video on it. thanks

pavantejavydhik
Автор

Do I see correctly you had over 5000 unchecked updates in your repos?

jakubiszon
Автор

Sir I have one doubt:
if we pass a number to the function not a string for eg:-
console.log(guestUser(10));
it gives output as:
Hello 10 and your course count is 0
i think that should not happen.
Please do respond.

tushar__og
Автор

What we should do, if we want name to be taken from default value and coursecount to be taken from argument we pass

nagendrarajas
Автор

Good job. How can I change only the 2nd param?

In other words, how can I omit the 1st param and still affect the 2nd?
Ex.: getUser(123) // hello john, count is 123.

johnbritolima
Автор

Brother. I am facing a problem.
What I did is-

Let myMultiplier = function(x, y, a){
Return x, y, a
}
Console.log(myMultiplier(1, 2, 3))

And it is printing only 3
.
I have got my mistake of * in return but still what this function is doing I am curious.

theinnovativemonk
Автор

can anyone tell me the solution for multiplication one I am getting error
let myMultiplier = function (num1, num2){
return num1*num2
}
myMultiplier(3, 4)

shreejasoni
Автор

sir how to take input guest name through user keyboard

kaifsiddique
Автор

let myMultiplier = function (num1, num2) {
return num1 * num2;
};
console.log(myMultiplier(7, 7));

srikanthracharla
Автор

make a video for other function method.

ruhankhandaker
Автор

one more way:
let mymulti=function(v1, v2)
{document.write(`result is, ${v1*v2}`)

}
mymulti(2, 3)

khadijasaleem