Good question!!, the same thing applies. The only difference in this case is that you are explicitly setting your argument to be undefined. The trick here is, whether you specify undefined explicitly or allow JavaScript to do it for you implicitly, the important thing to note is that once JavaScript reads undefined it uses the default parameters
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
What if I specify an argument with an
undefined
value?undefined
logically means that you are not specifying the argument. So it will use default value.Good question!!, the same thing applies. The only difference in this case is that you are explicitly setting your argument to be undefined. The trick here is, whether you specify undefined explicitly or allow JavaScript to do it for you implicitly, the important thing to note is that once JavaScript reads undefined it uses the default parameters