Skip to content

Instantly share code, notes, and snippets.

@zprima
Created August 16, 2020 07:17
Show Gist options
  • Select an option

  • Save zprima/b33de5f2e2ab3755fdf34c739aab27b8 to your computer and use it in GitHub Desktop.

Select an option

Save zprima/b33de5f2e2ab3755fdf34c739aab27b8 to your computer and use it in GitHub Desktop.
Fetching and disaplying random kana
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