Underscore.js Chaining Methods

Beginner
5 min read
Updated: Nov 2026
2 method guides
Method index

About This Index

This page is the Underscore.js Chaining index for the tutorial track. Each row links to a full guide with syntax, examples, and FAQs.

Learn helpers on Collections and Arrays. Use this page when you want a fluent pipeline with _.chain() and .value().

Beginner path.

Start with _.chain(), call a few Underscore methods, then finish with .value() to unwrap the result.

How to Chain Underscore Methods

Wrap with _.chain(), keep calling methods, then unwrap with .value():

Underscore
const people = [
  { name: "moe", age: 40 },
  { name: "larry", age: 50 },
  { name: "curly", age: 60 }
];

// Stay wrapped until .value()
const names = _.chain(people)
  .pluck("name")
  .map(function (n) { return n.toUpperCase(); })
  .value();
// ["MOE", "LARRY", "CURLY"]

// Same idea via the OOP wrapper
_(people).chain().pluck("age").max().value();  // 60

Underscore.js Chaining Methods Table

All chaining guides in this Underscore.js tutorial series (2 tutorials).

Getting Started

1 method

Start a fluent pipeline with _.chain().

MethodDescriptionTutorial
_.chain()Wraps a value so Underscore methods stay fluent until .value().Try it

Unwrap

1 method

Finish the pipeline and get a plain value.

MethodDescriptionTutorial
.value()Extracts the inner value from a wrapped chain object.Try it

Frequently Asked Questions

Chaining wraps a value with _.chain() so Underscore methods keep returning wrappers. Call .value() at the end to get the plain array, object, or string.
Collections and Arrays teach individual helpers. This Chaining index covers the fluent pipeline tools—_.chain() to stay wrapped and .value() to unwrap.
Yes after _.chain(). Each step returns a wrapper, not the data. Skipping .value() leaves a wrapped object. _(array).map() without .chain() usually unwraps after that one method.
_(obj) is object-oriented style: one method such as .map() typically returns a plain array. _.chain(obj) (or _(obj).chain()) keeps every following method wrapped until .value().
Open _.chain() first, then .value(). Practice a short pipeline such as map → filter → value.

Start with _.chain()

Open the chaining guide—syntax, examples, and FAQs.

_.chain() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

10 people found this page helpful