Help us understand the problem. What is going on with this article?

Google Apps Scriptを書いて思ったことメモ

More than 3 years have passed since last update.

Google Apps Scriptでちょっと長めのスクリプトを書いてみて思ったことメモです。

言語仕様みたいな解説がない

情報が豊富なリファレンスサイトがあるんだけど、スプレッドシート操作の内容が多い。

Google Apps Script入門
http://google-appsscript.blogspot.jp/

逆引きGoogle Apps Script
http://www.bmoo.net/archives/google-apps-script-refference

英語の公式ドキュメントもある。

公式ドキュメントのチュートリアル
https://developers.google.com/apps-script/articles

スプレッドシート操作以外の、基本的なスクリプト作成方法では、こちらのサイトが一番役に立った。
http://engineer-intern.jp/archives/category/column/start/googleappsscript
詳しく書かれてるわけじゃないんだけど、言語の雰囲気みたいなのがわかる。

メモ

undefined判定

if (bl !== undefined)

文字列の加算は+を使う

str = str1 + str2

文字列の空判定

if (str != "")

exit

exitさせたいときは例外を投げる

throw new Error("メッセージ")

行末

行末は「;」省略可

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away