Travis build: 1265

This commit is contained in:
30secondsofcode
2019-07-01 05:04:31 +00:00
parent f58b7faf9e
commit d76a5bf575
4 changed files with 5 additions and 2 deletions

View File

@@ -1871,7 +1871,7 @@ longestItem([1, 2, 3], 'foobar'); // 'foobar'
### mapObject ![advanced](/advanced.svg)
Maps the values of an array to an object using a function, where the key-value pairs consist of the original value as the key and the mapped value.
Maps the values of an array to an object using a function, where the key-value pairs consist of the stringified value as the key and the mapped value.
Use an anonymous inner function scope to declare an undefined memory space, using closures to store a return value. Use a new `Array` to store the array with a map of the function over its data set and a comma operator to return a second step, without needing to move from one context to another (due to closures and order of operations).
@@ -4731,6 +4731,7 @@ const checkProp = (predicate, prop) => obj => !!predicate(obj[prop]);
const lengthIs4 = checkProp(l => l === 4, 'length');
lengthIs4([]); // false
lengthIs4([1,2,3,4]); // true