Front End Programmer Question:

Explain how to use a function a Class?

Answer:

function functionName(name) {
this.name = name;
}
// Creating an object
var functionName = new functionName("WTEN");
console.log(functionName.name); //WTEN

Read All 67 Front End Developer Questions
Previous QuestionNext Question
Tell me how do you clear a floated element?Tell me how would you call a function directly on a string?