Open In App

Underscore.js _.functions() Function

Last Updated : 25 Apr, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Underscore.js _.functions() function is used to return the sorted list of all methods that are present in an object.

Syntax:

_.functions(object);

Parameters:

  • object: It contains the object element that holds the elements [key, value] pair.

Return Value:

It returns the sorted list of all methods that are present in an object.

Example: This example shows the use of the underscore.js _.functions() Function.

html
<!DOCTYPE html>
<html>

<head>
    <script type="text/javascript" src=
"https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.9.1/underscore-min.js">
    </script>
</head>

<body>
    <script type="text/javascript">
        console.log(_.functions(_)); 
    </script>
</body>

</html>

Output:

Screenshot-2024-01-10-184343
Output in the console

Next Article

Similar Reads