When doing JS development, we encapsulate complex third-party plug-ins and then expose a very simple method interface to the outside world. This is a commonly used method during development. In JS, our method parameters usually use JQ’s $.extend extension. Method to implement
That is, if we do not specify a value for arr, it will output the default value. What will happen if we assign a value to a certain attribute of the arr object?
That is, it only modifies the value of the specified attribute, and other values of the object remain at their original default values.
The || operator in JS has the same function as the || , this function is similar to
in C#? ? operator, so || in JS is quite powerful, haha.