1.4 KiB
1.4 KiB
id | title | challengeType | videoUrl | localeTitle |
---|---|---|---|---|
587d7dab367417b2b2512b6f | Use the some Method to Check that Any Elements in an Array Meet a Criteria | 1 | Используйте некоторый метод для проверки того, что любые элементы в массиве соответствуют критериям |
Description
undefined
Instructions
undefined
Tests
tests:
- text: ''
testString: 'assert(code.match(/\.some/g), "Your code should use the <code>some</code> method.");'
- text: ''
testString: 'assert(checkPositive([1, 2, 3, -4, 5]), "<code>checkPositive([1, 2, 3, -4, 5])</code> should return <code>true</code>.");'
- text: '<code>checkPositive([1, 2, 3, 4, 5])</code> должен возвращать <code>true</code> .'
testString: 'assert(checkPositive([1, 2, 3, 4, 5]), "<code>checkPositive([1, 2, 3, 4, 5])</code> should return <code>true</code>.");'
- text: ''
testString: 'assert(!checkPositive([-1, -2, -3, -4, -5]), "<code>checkPositive([-1, -2, -3, -4, -5])</code> should return <code>false</code>.");'
Challenge Seed
function checkPositive(arr) {
// Add your code below this line
// Add your code above this line
}
checkPositive([1, 2, 3, -4, 5]);
Solution
// solution required