JS Organizar la pestaña de cadena espaciada
console.log(` ${'Player'.padEnd(19)} ` +
`${'MATCH'.padEnd(8) } ` +
`${'SCORE'.padEnd(8) } `
);
for (const player of this.players) {
console.log(` - ${player.name.padEnd(20)} ` +
`${player.matches.length.toString().padEnd(8) } ` +
`${player.score.toString().padEnd(8) } `
);
}
/*
Player MATCH SCORE
- Bradly 5 15
- Sam 4 9
- Dew 3 5
*/
Defiant Dove