Ayuda
//comenatario "comillas" "123" "p1" " 'simple' '123' 'p1' ' var Baraja = { crearBaraja: function() { var palos = ["C", "D", "P", "T"]; var figuras = ["A", "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K"]; var valores = [11, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10]; var baraja = []; for (var i = 0; i < palos.length; i++) { for (var j = 0; j < figuras.length; j++) { baraja[baraja.length] = { palo: palos[i], valor: valores[j] }; } } return baraja; } };
Convertir
Vista previa
Mostrar HTML