Last active
December 27, 2021 21:28
-
-
Save russelllim22/39c1737908f4b80263400d1bd52216e7 to your computer and use it in GitHub Desktop.
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
<label for="year"> | |
Select a year: | |
<select id="year" selected="2020" bind:value={selectedYear} | |
on:change="{ | |
async () => { | |
letterCounts = []; | |
let response = await fetch(`names data/yob${selectedYear}.txt`); | |
let newFile = await response.text(); | |
showBars(newFile); | |
} | |
}"> | |
{#each years as year} | |
<option>{year}</option> | |
{/each} | |
</select> | |
</label> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment