Created
July 31, 2017 17:24
-
-
Save rodrwan/0cb6562cbd1b2871363153202bb638de to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const palos = ['c', 'p', 't','d'] | |
const barajas = [] | |
const cartas = 13 | |
for (let i = 0; i < palos.length; i++) { | |
for (let j = 1; j <= cartas; j++) { | |
const carta = { | |
palo: palos[i], | |
valor: j, | |
} | |
barajas.push(carta) | |
} | |
} | |
console.log(JSON.stringify(barajas, null, 2)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment