Newer
Older
Game / sample.js
@Yuto Togashi Yuto Togashi on 19 Sep 2022 448 bytes practice
//GASのAPIのURL(各自変更してください。)
const endpoint = "https://script.google.com/macros/s/AKfycbwGy_ohKubQtJyGjzpJ_ggpIGaN6n1VtM3KS1d7RiSomG0icZkqxCDb9Pbnf2RADe1Z/exec";

//APIを使って非同期データを取得する
fetch(endpoint)
.then(response => response.json())
/*成功した処理*/
.then(data => {
    //JSONから配列に変換
    const object = data;
    document.getElementById("data").innerHTML = object;
});