fix(guide): simplify directory structure

This commit is contained in:
Mrugesh Mohapatra
2018-10-16 21:26:13 +05:30
parent f989c28c52
commit da0df12ab7
35752 changed files with 0 additions and 317652 deletions

View File

@@ -0,0 +1,25 @@
---
title: Some Function
localeTitle: Alguna función
---
## Alguna función
La función `some()` se usa para verificar si al menos un elemento de una matriz cumple con una condición dada. La función devuelve `true` si la condición se cumple con un elemento, y falso si alguno de los elementos cumple con la condición
La sintaxis original de alguna función es:
```javascript
arr.some(function callback(currentValue, index, array) {
// Do some stuff with currentValue (index and array are optionals)
}, [thisArg]);
```
### Ejemplo (ES6):
```javascript
const arr = [1, 4, 5, 11];
if (arr.some(el => el % 2 == 0)) {
console.log("There's at least one even number");
}
```