Breaking News
yeni film izle hd film seyret film izle

Functions also behaves like objects In JavaScript

In Javascript functions also behave like objects. In JavaScript we can use function like an object. As an object is collection of variables and methods. The function also contains variables. We can access a function variables like object property by using dot(.) operator, as we access an object property.





function road()


var car = new Object”Lancer”


document.write(“<br> Car Name :”

document.write(“<br> Car Color :”+car.color)

document.write(“<br> Car Number :”


var mycar= new Object






Output is:
Car Name :Lancer
Car Color :Blue
Car Number :MAH2059

Check Also

Functions Returning Values In Java Script

Function is a set of statements recognized by a name and can be used as …