I share this blog with my thoughts and creations from my daily programming, knowledge, and technology updates.
Saturday, January 26, 2019
JavaScript関数の定義についてメモ
関数の定義にもいくつか種類がある
関数宣言
よく使うfunction 文
function showAlert() {
alert("hello");
}
関数式
無名関数
var myFunction = function() {
alert("hello");
}
名前付き関数
var myFunction = function showAlert(){
alert("hello");
}
即時関数
(function() {
alert("hello");
})();
アロー関数
() => {
alert("hello")
};
これはまだ個人的に使う機会がない
ジェネレータ関数
function* name([param[, param[, ... param]]]) {
statements
}
Latest post
スプレッドシートA列にある複数のテキストをスライドに追加したい(Google Apps Script)
今回Google Apps Scriptでやりたいこと GoogleスプレッドシートA列にある複数の値を取得して Googleスライドに渡して 図形オブジェクトのテキストとして追加したい ① スプレッドシートのA列に値を入れておく ② Code.gsのinsertNewShape...