学習記録

学習したことをより深く理解するために、アウトプットする場所として利用しています。

2023-08-01から1ヶ月間の記事一覧

ejsとnunjucksの比較

良い記事があった。 note.com

gsapで有償にするか判断する基準(一部)

You may use the code at no charge in commercial or non-commercial apps, web sites, games, components, and other software as long as end users are not charged a fee of any kind to use your product or gain access to any part of it. If your c…

JavaScript / new Map の使い方

一般的な動作は下記の通り const map = new Map(); map.set("key_1", "value_1"); map.set("key_2", "value_2"); map.set("key_3", "value_3"); // 値の取得 const value_1 = map.get("key_1"); console.log(value_1); // value_1 // キーの存在チェック con…

JavaScript / some の使い方

someメソッドは、配列の中の少なくとも1つの要素が指定した関数によってテストをパスするかどうかをチェックします。 テスト関数が真を返す場合、someメソッドはtrueを返し、そうでない場合はfalseを返します。 const numbers = [1, 2, 3, 4, 5]; const hasN…

JavaScript / forEach, map, filter の使い方

forEach const array = ["apple", "orange", "peach"]; array.forEach((item) => { console.log(item); }); // 結果 // apple // orange // peach map const array = ["apple", "orange", "peach"]; const results = array.map((item) => { return item; });…