Skip to content

Instantly share code, notes, and snippets.

@nishinoshake
Last active May 29, 2016 04:10
Show Gist options
  • Save nishinoshake/83f8c4c615ac3fec8f2e to your computer and use it in GitHub Desktop.
Save nishinoshake/83f8c4c615ac3fec8f2e to your computer and use it in GitHub Desktop.
とりあえずJSはこんな風に書くことにする
;(function () {
// 変数は一番上ででまとめて宣言
var i,
j,
k;
// functionの()はくっつける
// ,のあとはスペース
// ()の内側はすべてくっつける
function hoge(value1, value2) {
// 条件分岐とかの()は左右にスペース
// ;のあとはスペース
for (var i; i < 0; i++) {
// Oops
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment