{"action":"created","comment":{"url":"https://api.github.com/repos/socialtables/socialtables.github.io/pulls/comments/22620744","id":22620744,"diff_hunk":"@@ -0,0 +1,1479 @@\n+# Social Tables JavaScript Style Guide() {\n+\n+## Table of Contents\n+\n+  1. [QuickView](#quickview)\n+  1. [Types](#types)\n+  1. [Objects](#objects)\n+  1. [Arrays](#arrays)\n+  1. [Strings](#strings)\n+  1. [Functions](#functions)\n+  1. [Properties](#properties)\n+  1. [Variables](#variables)\n+  1. [Hoisting](#hoisting)\n+  1. [Conditional Expressions & Equality](#conditional-expressions--equality)\n+  1. [Blocks](#blocks)\n+  1. [Comments](#comments)\n+  1. [Whitespace](#whitespace)\n+  1. [Commas](#commas)\n+  1. [Semicolons](#semicolons)\n+  1. [Type Casting & Coercion](#type-casting--coercion)\n+  1. [Naming Conventions](#naming-conventions)\n+  1. [Accessors](#accessors)\n+  1. [Constructors](#constructors)\n+  1. [Events](#events)\n+  1. [Performance](#performance)\n+  1. [Resources](#resources)\n+  1. [License](#license)\n+\n+## Quickview\n+  Read this section for main takeaways most relevant to our daily work.\n+\n+  - **General**\n+    + Lines should not be longer than 80 characters\n+    + Functions should be < 50 lines **Note: thoughts??**\n+    + Semicolons. Use them.\n+    + Use camelCase for objects, functions, and instances\n+    + Use PascalCase for constructors and classes\n+    + Use UPPERCASE for constants\n+    + Name your functions. This is helpful for stack traces\n+    + Method Chaining: each new method should be on a new line and indented\n+    + Never extend built-in prototypes \n+\n+  - **Objects**\n+\n+    + Use the literal syntax for object creation.\n+    \n+    ```javascript\n+    // bad\n+    var item = new Object();\n+\n+    // good\n+    var item = {};\n+    ```\n+  - **Arrays**\n+    + Use myArray.push(x) instead of myArray[myArray.length] = x\n+    + Use Array#slice to copy an array\n+  \n+  - **Strings**\n+    + **Note: Thoughts on always single quotes vs double quotes? Other say single quotes**\n+\n+  - **Functions**\n+\n+  - **Properties**\n+    + Access properties via dot notation (myObj.name) rather than subscript notation (myObj[name])\n+\n+  - **Variables**\n+    + Always use `var` to declare variables\n+    + Use one `var` declaration per variable\n+    + Assign variables at the top of their scope\n+    + Declare unassigned variables last\n+    + Declare one variable per line **Note: thoughts on this?**\n+    + Use names that make sense. Don't use reserved words. Avoid single letters\n+\n+  - **Hoisting** [Read this section. It's good.](#hoisting)\n+\n+  - **Conditional Expressions & Equality**\n+    + Use `===` and `!==` over `==` and `!=`\n+    + Avoid duplication like `if (name !== '')`. Use `if (name)` instead.\n+\n+  - **Blocks**\n+    + Separate into multiple lines and use braces\n+      \n+      ```javascript\n+      // bad\n+      if (true) { return true; }\n+      \n+      // good\n+      if (true) {\n+        return true;\n+      }\n+      ```\n+\n+  - **Comments**\n+    + **NOTE: do people prefer `//` or `/** ... */` for multiline comments?**","path":"style-guides/javascript/README.md","position":94,"original_position":94,"commit_id":"1ecf7c1db00e15eff36e4ce3c81feb7d4e961c49","original_commit_id":"1ecf7c1db00e15eff36e4ce3c81feb7d4e961c49","user":{"login":"ecgeiser","id":8314270,"avatar_url":"https://avatars.githubusercontent.com/u/8314270?v=3","gravatar_id":"","url":"https://api.github.com/users/ecgeiser","html_url":"https://github.com/ecgeiser","followers_url":"https://api.github.com/users/ecgeiser/followers","following_url":"https://api.github.com/users/ecgeiser/following{/other_user}","gists_url":"https://api.github.com/users/ecgeiser/gists{/gist_id}","starred_url":"https://api.github.com/users/ecgeiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecgeiser/subscriptions","organizations_url":"https://api.github.com/users/ecgeiser/orgs","repos_url":"https://api.github.com/users/ecgeiser/repos","events_url":"https://api.github.com/users/ecgeiser/events{/privacy}","received_events_url":"https://api.github.com/users/ecgeiser/received_events","type":"User","site_admin":false},"body":"If you've already written a one-line comment and need to add to it, you can just start a new line with // instead of changing the first // to a /*\r\n\r\nAlso I like commenting things out with a simple cmd+/ -- if you know of a keyboard shortcut for for the other way then I cede this point","created_at":"2015-01-07T22:13:21Z","updated_at":"2015-01-07T22:13:21Z","html_url":"https://github.com/socialtables/socialtables.github.io/pull/5#discussion_r22620744","pull_request_url":"https://api.github.com/repos/socialtables/socialtables.github.io/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/socialtables/socialtables.github.io/pulls/comments/22620744"},"html":{"href":"https://github.com/socialtables/socialtables.github.io/pull/5#discussion_r22620744"},"pull_request":{"href":"https://api.github.com/repos/socialtables/socialtables.github.io/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/socialtables/socialtables.github.io/pulls/5","id":26970101,"html_url":"https://github.com/socialtables/socialtables.github.io/pull/5","diff_url":"https://github.com/socialtables/socialtables.github.io/pull/5.diff","patch_url":"https://github.com/socialtables/socialtables.github.io/pull/5.patch","issue_url":"https://api.github.com/repos/socialtables/socialtables.github.io/issues/5","number":5,"state":"open","locked":false,"title":"Judy/js style guide","user":{"login":"jjow","id":5253364,"avatar_url":"https://avatars.githubusercontent.com/u/5253364?v=3","gravatar_id":"","url":"https://api.github.com/users/jjow","html_url":"https://github.com/jjow","followers_url":"https://api.github.com/users/jjow/followers","following_url":"https://api.github.com/users/jjow/following{/other_user}","gists_url":"https://api.github.com/users/jjow/gists{/gist_id}","starred_url":"https://api.github.com/users/jjow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjow/subscriptions","organizations_url":"https://api.github.com/users/jjow/orgs","repos_url":"https://api.github.com/users/jjow/repos","events_url":"https://api.github.com/users/jjow/events{/privacy}","received_events_url":"https://api.github.com/users/jjow/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-07T16:50:20Z","updated_at":"2015-01-07T22:13:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2c99b503a4f6624271143e93286f68a41804926e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/socialtables/socialtables.github.io/pulls/5/commits","review_comments_url":"https://api.github.com/repos/socialtables/socialtables.github.io/pulls/5/comments","review_comment_url":"https://api.github.com/repos/socialtables/socialtables.github.io/pulls/comments/{number}","comments_url":"https://api.github.com/repos/socialtables/socialtables.github.io/issues/5/comments","statuses_url":"https://api.github.com/repos/socialtables/socialtables.github.io/statuses/1ecf7c1db00e15eff36e4ce3c81feb7d4e961c49","head":{"label":"socialtables:judy/js-style-guide","ref":"judy/js-style-guide","sha":"1ecf7c1db00e15eff36e4ce3c81feb7d4e961c49","user":{"login":"socialtables","id":1447804,"avatar_url":"https://avatars.githubusercontent.com/u/1447804?v=3","gravatar_id":"","url":"https://api.github.com/users/socialtables","html_url":"https://github.com/socialtables","followers_url":"https://api.github.com/users/socialtables/followers","following_url":"https://api.github.com/users/socialtables/following{/other_user}","gists_url":"https://api.github.com/users/socialtables/gists{/gist_id}","starred_url":"https://api.github.com/users/socialtables/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socialtables/subscriptions","organizations_url":"https://api.github.com/users/socialtables/orgs","repos_url":"https://api.github.com/users/socialtables/repos","events_url":"https://api.github.com/users/socialtables/events{/privacy}","received_events_url":"https://api.github.com/users/socialtables/received_events","type":"Organization","site_admin":false},"repo":{"id":27467428,"name":"socialtables.github.io","full_name":"socialtables/socialtables.github.io","owner":{"login":"socialtables","id":1447804,"avatar_url":"https://avatars.githubusercontent.com/u/1447804?v=3","gravatar_id":"","url":"https://api.github.com/users/socialtables","html_url":"https://github.com/socialtables","followers_url":"https://api.github.com/users/socialtables/followers","following_url":"https://api.github.com/users/socialtables/following{/other_user}","gists_url":"https://api.github.com/users/socialtables/gists{/gist_id}","starred_url":"https://api.github.com/users/socialtables/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socialtables/subscriptions","organizations_url":"https://api.github.com/users/socialtables/orgs","repos_url":"https://api.github.com/users/socialtables/repos","events_url":"https://api.github.com/users/socialtables/events{/privacy}","received_events_url":"https://api.github.com/users/socialtables/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/socialtables/socialtables.github.io","description":"","fork":false,"url":"https://api.github.com/repos/socialtables/socialtables.github.io","forks_url":"https://api.github.com/repos/socialtables/socialtables.github.io/forks","keys_url":"https://api.github.com/repos/socialtables/socialtables.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/socialtables/socialtables.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/socialtables/socialtables.github.io/teams","hooks_url":"https://api.github.com/repos/socialtables/socialtables.github.io/hooks","issue_events_url":"https://api.github.com/repos/socialtables/socialtables.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/socialtables/socialtables.github.io/events","assignees_url":"https://api.github.com/repos/socialtables/socialtables.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/socialtables/socialtables.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/socialtables/socialtables.github.io/tags","blobs_url":"https://api.github.com/repos/socialtables/socialtables.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/socialtables/socialtables.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/socialtables/socialtables.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/socialtables/socialtables.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/socialtables/socialtables.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/socialtables/socialtables.github.io/languages","stargazers_url":"https://api.github.com/repos/socialtables/socialtables.github.io/stargazers","contributors_url":"https://api.github.com/repos/socialtables/socialtables.github.io/contributors","subscribers_url":"https://api.github.com/repos/socialtables/socialtables.github.io/subscribers","subscription_url":"https://api.github.com/repos/socialtables/socialtables.github.io/subscription","commits_url":"https://api.github.com/repos/socialtables/socialtables.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/socialtables/socialtables.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/socialtables/socialtables.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/socialtables/socialtables.github.io/issues/comments/{number}","contents_url":"https://api.github.com/repos/socialtables/socialtables.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/socialtables/socialtables.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/socialtables/socialtables.github.io/merges","archive_url":"https://api.github.com/repos/socialtables/socialtables.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/socialtables/socialtables.github.io/downloads","issues_url":"https://api.github.com/repos/socialtables/socialtables.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/socialtables/socialtables.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/socialtables/socialtables.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/socialtables/socialtables.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/socialtables/socialtables.github.io/labels{/name}","releases_url":"https://api.github.com/repos/socialtables/socialtables.github.io/releases{/id}","created_at":"2014-12-03T03:30:36Z","updated_at":"2014-12-10T06:29:30Z","pushed_at":"2015-01-07T16:49:02Z","git_url":"git://github.com/socialtables/socialtables.github.io.git","ssh_url":"git@github.com:socialtables/socialtables.github.io.git","clone_url":"https://github.com/socialtables/socialtables.github.io.git","svn_url":"https://github.com/socialtables/socialtables.github.io","homepage":null,"size":352,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"socialtables:master","ref":"master","sha":"577a840ffd3182cd3c6a1ef7c68833a50b4dce53","user":{"login":"socialtables","id":1447804,"avatar_url":"https://avatars.githubusercontent.com/u/1447804?v=3","gravatar_id":"","url":"https://api.github.com/users/socialtables","html_url":"https://github.com/socialtables","followers_url":"https://api.github.com/users/socialtables/followers","following_url":"https://api.github.com/users/socialtables/following{/other_user}","gists_url":"https://api.github.com/users/socialtables/gists{/gist_id}","starred_url":"https://api.github.com/users/socialtables/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socialtables/subscriptions","organizations_url":"https://api.github.com/users/socialtables/orgs","repos_url":"https://api.github.com/users/socialtables/repos","events_url":"https://api.github.com/users/socialtables/events{/privacy}","received_events_url":"https://api.github.com/users/socialtables/received_events","type":"Organization","site_admin":false},"repo":{"id":27467428,"name":"socialtables.github.io","full_name":"socialtables/socialtables.github.io","owner":{"login":"socialtables","id":1447804,"avatar_url":"https://avatars.githubusercontent.com/u/1447804?v=3","gravatar_id":"","url":"https://api.github.com/users/socialtables","html_url":"https://github.com/socialtables","followers_url":"https://api.github.com/users/socialtables/followers","following_url":"https://api.github.com/users/socialtables/following{/other_user}","gists_url":"https://api.github.com/users/socialtables/gists{/gist_id}","starred_url":"https://api.github.com/users/socialtables/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socialtables/subscriptions","organizations_url":"https://api.github.com/users/socialtables/orgs","repos_url":"https://api.github.com/users/socialtables/repos","events_url":"https://api.github.com/users/socialtables/events{/privacy}","received_events_url":"https://api.github.com/users/socialtables/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/socialtables/socialtables.github.io","description":"","fork":false,"url":"https://api.github.com/repos/socialtables/socialtables.github.io","forks_url":"https://api.github.com/repos/socialtables/socialtables.github.io/forks","keys_url":"https://api.github.com/repos/socialtables/socialtables.github.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/socialtables/socialtables.github.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/socialtables/socialtables.github.io/teams","hooks_url":"https://api.github.com/repos/socialtables/socialtables.github.io/hooks","issue_events_url":"https://api.github.com/repos/socialtables/socialtables.github.io/issues/events{/number}","events_url":"https://api.github.com/repos/socialtables/socialtables.github.io/events","assignees_url":"https://api.github.com/repos/socialtables/socialtables.github.io/assignees{/user}","branches_url":"https://api.github.com/repos/socialtables/socialtables.github.io/branches{/branch}","tags_url":"https://api.github.com/repos/socialtables/socialtables.github.io/tags","blobs_url":"https://api.github.com/repos/socialtables/socialtables.github.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/socialtables/socialtables.github.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/socialtables/socialtables.github.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/socialtables/socialtables.github.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/socialtables/socialtables.github.io/statuses/{sha}","languages_url":"https://api.github.com/repos/socialtables/socialtables.github.io/languages","stargazers_url":"https://api.github.com/repos/socialtables/socialtables.github.io/stargazers","contributors_url":"https://api.github.com/repos/socialtables/socialtables.github.io/contributors","subscribers_url":"https://api.github.com/repos/socialtables/socialtables.github.io/subscribers","subscription_url":"https://api.github.com/repos/socialtables/socialtables.github.io/subscription","commits_url":"https://api.github.com/repos/socialtables/socialtables.github.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/socialtables/socialtables.github.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/socialtables/socialtables.github.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/socialtables/socialtables.github.io/issues/comments/{number}","contents_url":"https://api.github.com/repos/socialtables/socialtables.github.io/contents/{+path}","compare_url":"https://api.github.com/repos/socialtables/socialtables.github.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/socialtables/socialtables.github.io/merges","archive_url":"https://api.github.com/repos/socialtables/socialtables.github.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/socialtables/socialtables.github.io/downloads","issues_url":"https://api.github.com/repos/socialtables/socialtables.github.io/issues{/number}","pulls_url":"https://api.github.com/repos/socialtables/socialtables.github.io/pulls{/number}","milestones_url":"https://api.github.com/repos/socialtables/socialtables.github.io/milestones{/number}","notifications_url":"https://api.github.com/repos/socialtables/socialtables.github.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/socialtables/socialtables.github.io/labels{/name}","releases_url":"https://api.github.com/repos/socialtables/socialtables.github.io/releases{/id}","created_at":"2014-12-03T03:30:36Z","updated_at":"2014-12-10T06:29:30Z","pushed_at":"2015-01-07T16:49:02Z","git_url":"git://github.com/socialtables/socialtables.github.io.git","ssh_url":"git@github.com:socialtables/socialtables.github.io.git","clone_url":"https://github.com/socialtables/socialtables.github.io.git","svn_url":"https://github.com/socialtables/socialtables.github.io","homepage":null,"size":352,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/socialtables/socialtables.github.io/pulls/5"},"html":{"href":"https://github.com/socialtables/socialtables.github.io/pull/5"},"issue":{"href":"https://api.github.com/repos/socialtables/socialtables.github.io/issues/5"},"comments":{"href":"https://api.github.com/repos/socialtables/socialtables.github.io/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/socialtables/socialtables.github.io/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/socialtables/socialtables.github.io/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/socialtables/socialtables.github.io/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/socialtables/socialtables.github.io/statuses/1ecf7c1db00e15eff36e4ce3c81feb7d4e961c49"}}}}