mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-12 01:00:13 -04:00
chore(i18n,learn): processed translations (#55161)
This commit is contained in:
committed by
GitHub
parent
1a5c86d4dc
commit
f0386106d4
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 587d7dab367417b2b2512b6f
|
||||
title: Use the some Method to Check that Any Elements in an Array Meet a Criteria
|
||||
title: 배열의 요소가 기준을 충족하는지 확인하는 some 메소드 사용하기
|
||||
challengeType: 1
|
||||
forumTopicId: 301314
|
||||
dashedName: use-the-some-method-to-check-that-any-elements-in-an-array-meet-a-criteria
|
||||
@@ -8,9 +8,9 @@ dashedName: use-the-some-method-to-check-that-any-elements-in-an-array-meet-a-cr
|
||||
|
||||
# --description--
|
||||
|
||||
The `some` method works with arrays to check if *any* element passes a particular test. It returns a Boolean value - `true` if any of the values meet the criteria, `false` if not.
|
||||
`some` 메소드는 *어떠한* 요소라도 특정 테스트를 통과하는지 확인할 때 사용하기 좋습니다. 어떤 값이 기준에 맞는다면 `true`, 맞지 않는다면 `false`를 반환합니다.
|
||||
|
||||
For example, the following code would check if any element in the `numbers` array is less than 10:
|
||||
예를 들면 다음 코드는 `numbers`의 어떤 요소가 10보다 작은지 확인합니다.
|
||||
|
||||
```js
|
||||
const numbers = [10, 50, 8, 220, 110, 11];
|
||||
@@ -20,21 +20,21 @@ numbers.some(function(currentValue) {
|
||||
});
|
||||
```
|
||||
|
||||
The `some` method would return `true`.
|
||||
이 `some` 메소드는 `true`를 반환할 것입니다.
|
||||
|
||||
# --instructions--
|
||||
|
||||
Use the `some` method inside the `checkPositive` function to check if any element in `arr` is positive. 이 함수는 불리언(boolean) 값을 반환해야 합니다.
|
||||
`arr`에 양수인 요소가 있는지 확인하도록 `checkPositive` 함수 안에 `some` 메소드를 사용하시오. 이 함수는 불리언(boolean) 값을 반환해야 합니다.
|
||||
|
||||
# --hints--
|
||||
|
||||
Your code should use the `some` method.
|
||||
`some` 메소드를 사용해야 합니다.
|
||||
|
||||
```js
|
||||
assert(__helpers.removeJSComments(code).match(/\.some/g));
|
||||
```
|
||||
|
||||
`checkPositive([1, 2, 3, -4, 5])` should return `true`.
|
||||
`checkPositive([1, 2, 3, -4, 5])`는 `true`를 반환해야 합니다.
|
||||
|
||||
```js
|
||||
assert(checkPositive([1, 2, 3, -4, 5]));
|
||||
@@ -46,7 +46,7 @@ assert(checkPositive([1, 2, 3, -4, 5]));
|
||||
assert(checkPositive([1, 2, 3, 4, 5]));
|
||||
```
|
||||
|
||||
`checkPositive([-1, -2, -3, -4, -5])` should return `false`.
|
||||
`checkPositive([-1, -2, -3, -4, -5])`는 `false`를 반환해야 합니다.
|
||||
|
||||
```js
|
||||
assert(!checkPositive([-1, -2, -3, -4, -5]));
|
||||
|
||||
Reference in New Issue
Block a user