Get started with underscore.js CDN

MIT licensed

Underscore.js: Popular library for simplifying tasks with utility functions in JS.

Tags:
  • utility

Stable version

Copied!

How to start using underscore.js CDN


// Include Underscore.js library from the CDN
const _ = window._;

// Sample data
const numbers = [1, 2, 3, 4];

// Use _.map function to square each number in the array
const squaredNumbers = _.map(numbers, (num) => num * num);

// Log the result
console.log(squaredNumbers); // [1, 4, 9, 16]
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!
Copied!

All versions