call function javascript

JavaScript
var person = {

  firstName:"John",

  lastName: "Doe",

    fullName: function () {

    return this.firstName + " " + this.lastName;

    }

}

	person.fullName();   // Will return "John Doe"
 // Define your function
function sayHello(msg){
	console.log("Hello, " + msg);
}

// Call it
sayHello("Norris");

// outputs:
// Hello, Norrisfunction abc() {
  alert('test');
}

var funcName = 'abc';

window[funcName]();var person = {

    fullName: function() {

    return this.firstName + " " + this.lastName;

    }
}

var person1 = {

  firstName:"John",

    lastName: "Doe"

  }

var person2 = {

  firstName:"Mary",

    lastName: "Doe"
}

	person.fullName.call(person1);  // Will return "John 
	Doe"
 
Source

Also in JavaScript: