diff --git a/pages/articles/javascript-conventions/how-to-create-default-parameters-for-functions/content.md b/pages/articles/javascript-conventions/how-to-create-default-parameters-for-functions/content.md index 1581cdc..15ac9ad 100644 --- a/pages/articles/javascript-conventions/how-to-create-default-parameters-for-functions/content.md +++ b/pages/articles/javascript-conventions/how-to-create-default-parameters-for-functions/content.md @@ -27,7 +27,7 @@ The first idiom is giving a default value for the last parameter. This is done b betterExample(""); -If the optional value is in the middle it can cause some undesired effects, since all the parameters are shifted over. The optional parameter is not the `undefined` value in this case - the last parameter is the `undefined` one. So you have to check if the last parameter is `undefined` and then manually fix all the other parameters before continuing in the code. This example shows you how to do that: +If the optional value is in the middle, it can cause some undesired effects, since all the parameters are shifted over. The optional parameter is not the `undefined` value in this case - the last parameter is the `undefined` one. So you have to check if the last parameter is `undefined` and then manually fix all the other parameters before continuing in the code. This example shows you how to do that: example = function (param1, optParam, callback) { if (typeof callback === 'undefined') {