Skip to content

Conversation

@innoagostinelli
Copy link

The button clear is enable when all the inputs are different than ' '

@eloytoro
Copy link
Owner

eloytoro commented Jul 9, 2016

Brutal 👍
Para la proxima te recomiendo usar la funcion Array.prototype.every

// Revisar si todos los numeros de un array son pares
var arr = [4, 6, 8];
var todos_pares = arr.every(number => number % 2 === 0);
console.log(todos_pares) // true

var arr = [4, 5, 6];
var todos_pares = arr.every(number => number % 2 === 0);
console.log(todos_pares) // false

Hace el codigo un poco mas limpio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants