Announcement

Collapse
No announcement yet.

Can we define properties for functions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can we define properties for functions

    Can we define properties for functions



    Yes, We can define properties for functions because functions are also objects.


    Code:
    fn = function(x) {
    //Function code goes here
    }
    
    fn.name = "John";
    
    fn.profile = function(y) {
    //Profile code goes here
    }

Related Topics

Collapse

Working...
X