Check out a free preview of the full JavaScript: From Fundamentals to Functional JS, v2 course:
The "Default Parameters" Lesson is part of the full, JavaScript: From Fundamentals to Functional JS, v2 course featured in this preview video. Here's what you'd learn in this lesson:

Bianca discusses default parameters, which are default values when an argument is either omitted or undefined.

Get Unlimited Access Now

Transcript from the "Default Parameters" Lesson

[00:00:00]
>> Bianca Gandolfo: Another cool thing is default parameters. Can anyone take a wild guess of what a default parameter might be?
>> Speaker 2: If you don't pass the value, it gets set to that default value.
>> Bianca Gandolfo: Yeah, how helpful is that? I really like that part actually. There are some parts of the that I don't really care too much about, especially when it gives so much variance and syntax and stuff like that.

[00:00:27] Makes life as an instructor very difficult. But things like this, I'm like, okay, it's good. I like this. However, this interesting thing here is that it's only gonna console out three for the arguments, in this case where we didn't pass two arguments. So something to keep in mind that the argument's keyword is only paying attention to the explicit values being passed into the function, and if there's something like a default value or a spread operator, it's not going to-

[00:01:03]
>> Speaker 3: So it doesn't tell you anything about parameters at all. It just tells you about arguments?
>> Bianca Gandolfo: Yep, exactly. Which, if you think about it, is what you care about, for the most part.