what am i doing wrong? and what am i doing right? please help
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
// below is my problem
function updateScore(value, id) {
const selectedValue = parseInt(value, id);
score += selectedValue;
totalScoreElement.textContent = score;
// 4. Add new score entry to history
const li = document.createElement('li');
li.textContent = `${id} : ${value}`;
scoreHistoryElement.appendChild(li);
}
updateStats();
// 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/137.0.0.0 Safari/537.36 Edg/137.0.0.0
Challenge Information:
Review Algorithmic Thinking by Building a Dice Game - Step 9
While parseInt()can take two arguments, the second optional argument would be the radix, a number, like you said, that defaults to 10. But is that what id is here?
the second parameter will be passed the id value of the radio button, which is the type of score they achieved