call() is defined on the object
Function.prototype, according to MDN:
call()method calls a function with a given
thisvalue and arguments provided individually.
func.call([thisArg[, arg1, arg2, ...argN]])
For example, we have the following code:
Vue.js has been gaining popularity in recent years, and in my opinion, Vue is the first-choice frontend framework for small to middle-sized projects. There are a bunch of UI component libraries for Vue, the most popular one among them seems to have been Vuetify. Often based on our own business and project requirements, we need to customize a UI library component, and this article shows how to build our custom components based on Vuetify.
Let’s first create a new Vue project with Vuetify. Following the Vuetify guide, it is very easy:
We first create a new project named
The concept of the
new operator is from class-based object-oriented languages such as C++ and Java. It is used to create an instance or object of a class and in general, it mainly does two things:
Instantiating — allocating spaces in memory for the object being created, and
Initialization — executing the constructor method and initializing the object (e.g. its member variables and member functions).
new operator does its very specific things and is very different from the
new operator in Java.
According to MDN:
Full-stack “digital builder”, Agile advocator