Author: Not specified Language: javascript
Description: Not specified Timestamp: 2018-04-16 17:26:59 +0000
View raw paste Reply
  1. _.map()
  2. 1 _.map([1, 2, 3], function(value) {
  3. 2   return value * 3;
  4. 3 });
  5. 4 // ? [3, 6, 9]
  6. 1 _.map('Hello World', function(x) {
  7. 2   return x.charCodeAt(0);
  8. 3 });
  9. 4 // ? [ 72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100 ]
View raw paste Reply