Created
August 16, 2020 07:17
-
-
Save zprima/b33de5f2e2ab3755fdf34c739aab27b8 to your computer and use it in GitHub Desktop.
Fetching and disaplying random kana
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 nextRandomKana() { | |
| const random = Math.floor(Math.random() * kana.length); | |
| const newKana = kana[random]; | |
| document.getElementById('romaji').innerText = newKana.en; | |
| document.getElementById('h_tip').innerText = newKana.hiragana_info; | |
| document.getElementById('k_tip').innerText = newKana.katakana_info; | |
| document.getElementById('hiragana').innerText = newKana.hiragana; | |
| document.getElementById('katakana').innerText = newKana.katakana; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment