Last active
February 4, 2020 11:19
-
-
Save danhollick/8442ef3d1da42174f72cf9eee3bf3d5c to your computer and use it in GitHub Desktop.
update scores
This file contains hidden or 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
function updateScores(id, score) { | |
const element = document.getElementById(id) | |
element.className = score | |
element.textContent = score | |
return element | |
} | |
//... | |
updateScores('normalTextScore', message.scores.normalText) | |
updateScores('largeTextScore', message.scores.largeText) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment