Skip to content

Commit

Permalink
automatic number updates
Browse files Browse the repository at this point in the history
  • Loading branch information
nadiavanleur committed Mar 28, 2024
1 parent aa2f60e commit ac4d021
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,8 @@ <h2 class="c-title">

const setValues = async () => {
const values = await getValues();
[...Object.keys(FIELDS)].forEach((key) => {
console.log(values);
const value = [...values].find(total => total.includes(FIELDS[key]))[1];
Object.keys(FIELDS).forEach((key) => {
const value = values.find(total => total.includes(FIELDS[key]))[1];
const stringValue = value.toString();
const htmlValue = stringValue.split("").map((char) => `<span>${char}</span>`).join("");
document.getElementById(key).innerHTML = htmlValue;
Expand Down

0 comments on commit ac4d021

Please sign in to comment.