Underscore.js _.chain() Function (original) (raw)
Last Updated : 10 Jan, 2024
Underscore.js **_.chain() function is an inbuilt function in the Underscore.js library of JavaScript which is used to find a wrapped object. Moreover, invoking the methods on this _object will continue to return the wrapped objects until the _value is invoked.
**Syntax:
_.chain(obj);
**Parameters:
- **obj: It is the stated object.
**Return Value:
This method returns a wrapped object.
**Example 1: In this example, we are using the Underscore.js _.chain() function.
HTML `
Document<head>
<script src=
<body>
<script>
console.log(_.chain([99, 3, 4, 6]).push(100));
</script>
</body>
</html>
`
**Output:
[99, 3, 4, 6, 100]
**Example 2: In this example, we are using the Underscore.js _.chain() function.
javascript `