) ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/@@hasInstance)
    2. [ ` Function.prototype.apply() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply)
    3. [ ` Function.prototype.bind() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind)
    4. [ ` Function.prototype.call() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call)
    5. [ ` Function.prototype.toString() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/toString)
  6. **Inheritance**
  7. **[ ` Object ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) **
  8. Properties 
    1. [ ` Object.prototype.constructor ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor)
    2. [ ` Object.prototype.__proto__ ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/proto) Deprecated 
  9. Methods 
    1. [ ` Object.prototype.__defineGetter__() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__defineGetter__) Deprecated 
    2. [ ` Object.prototype.__defineSetter__() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__defineSetter__) Deprecated 
    3. [ ` Object.prototype.__lookupGetter__() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__lookupGetter__) Deprecated 
    4. [ ` Object.prototype.__lookupSetter__() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__lookupSetter__) Deprecated 
    5. [ ` Object.prototype.hasOwnProperty() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty)
    6. [ ` Object.prototype.isPrototypeOf() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isPrototypeOf)
    7. [ ` Object.prototype.propertyIsEnumerable() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/propertyIsEnumerable)
    8. [ ` Object.prototype.toLocaleString() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toLocaleString)
    9. [ ` Object.prototype.toString() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString)
    10. [ ` Object.prototype.valueOf() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/valueOf)

##  In this article

  * Try it 
  * Value 
  * Description 
  * Examples 
  * Specifications 
  * Browser compatibility 
  * See also 

#  Function: name

The **` name ` ** data property of a [ ` Function ` ](/en-
US/docs/Web/JavaScript/Reference/Global_Objects/Function) instance indicates
the function's name as specified when it was created, or it may be either `
anonymous ` or ` '' ` (an empty string) for functions created anonymously.

##  Try it

##  Value

A string.

Property attributes of ` Function: name `  
---  
Writable  |  no   
Enumerable  |  no   
Configurable  |  yes   
  
**Note:** In non-standard, pre-ES2015 implementations the ` configurable `
attribute was ` false ` as well.

##  Description

The function's ` name ` property can be used to identify the function in
debugging tools or error messages. It has no semantic significance to the
language itself.

The ` name ` property is read-only and cannot be changed by the assignment
operator:

js

    
    
    function someFunction() {}
    
    someFunction.name = "otherFunction";
    console.log(someFunction.name); // someFunction
    

To change it, use [ ` Object.defineProperty() ` ](/en-
US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty) .

The ` name ` property is typically inferred from how the function is defined.
In the following sections, we will describe the various ways in which it can
be inferred.

###  Function declaration

The ` name ` property returns the name of a function declaration.

js

    
    
    function doSomething() {}
    doSomething.name; // "doSomething"
    

###  Default-exported function declaration

An [ ` export default ` ](/en-
US/docs/Web/JavaScript/Reference/Statements/export) declaration exports the
function as a declaration instead of an expression. If the d