LANG SELRCT

Apps Script Reference  (Create: Create new Spreadsheet | Create new Apps Script

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

Extracting data from Google Sheets with regular expressions

Introduction Regular expressions are a powerful tool that can be used to extract data from text.  In Google Sheets, regular expressions ca...