![]() |
VOOZH | about |
Underscore.js_.defaults() function returns the object after filling in its undefined properties with the first value present in the following list of default objects.
_.defaults(object, *defaults);It returns the object after filling in its undefined properties with the first value present in the following list of default objects.
Example 1: The below code example implements the _.defaults() function in underscore.js.
Output:
👁 ImageExample 2: This is another implementation of the _.defaults() function.