Tell us what’s happening:
Hi
I didn’t understand why setPlayerCards function was used, In switch case we can assign the values to players card innerHTML using assignment operator in the specific case itself (I have tried that but it didn’t worked don’t know why).
Can some body explain that why this setPlayerCards function was used when we can display inside switch case itself
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Challenge Information:
Learn Modern JavaScript Methods by Building Football Team Cards - Step 47