{"action":"created","comment":{"url":"https://api.github.com/repos/jwunderl/pxt-arcade/pulls/comments/223097665","pull_request_review_id":162150204,"id":223097665,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMzA5NzY2NQ==","diff_hunk":"@@ -26,20 +61,83 @@ if (num == 1) {\n }\n ```\n \n-### Add more examples of if statements with logic expressions they have seen\n+Notice how we have been using curly braces (`{` and `}`) and indentations in our code. This is done for two reasons. The first being that it makes our code more readable. We can look at our code and easily decipher what is part of the if statement and what isn't. The second reason is for functionality. While it is true that our code would run the same if we didn't use indentations, we cannot say the same about curly braces. Curly braces are used to group code together. After the condition (or else), the if statement will accept the first thing that follows as what should run if the condition is true (or false). This can either be one line of code, or lines of code grouped together by curly braces. \n+\n+With this in mind, the following is completely valid code\n \n ```typescript\n-let word: string = \"word\";\n let num: number = 1;\n+if (num == 1) console.log(\"num is one!\");\n+else console.log(\"num is not one!\");\n+```\n+\n+This keeps if statements small and compact, but is usually avoided.\n+\n+## Student Task 1:\n \n-if (word == \"word\" && num > 0) {\n-    if (num < 2) {\n-        console.log(\"I'm here!\");\n-    } else {\n-        console.log(\"No I'm here!\");\n-    }\n+1. Create a variable that stores a number\n+2. Use an `if` statement to perform some comparison on this variable\n+3. If the condition is true, print a message to the console\n+4. If the condition is false, print a different message to the console\n+\n+## Booleans\n+\n+In blocks, we saw that we could store the value of a boolean as a variable so that we could keep track of it. In JavaScript, we do the same.\n+\n+```block\n+let x = true\n+```\n+\n+is equivalent to \n+\n+```typescript\n+let x: boolean = true;\n+```\n+\n+### Boolean Operators\n+\n+We saw in blocks a way of performing operations on boolean. This was done with the use of Boolean Operators. \n+\n+Here is a table of these operators and their JavaScript equivalents\n+\n+|Name \t|JavaScript \t\t\t\t\t|Precedence |\n+|:---\t|:---:\t\t\t\t\t\t\t|:---:\t\t|\n+|Not \t|`!bool1`\t\t\t\t\t\t|Highest\t|\n+|And\t|`bool1 && bool2`\t\t\t\t|Medium\t\t|\n+|Or \t|`bool1` &vert;&vert; `bool2` \t|Lowest\t\t|\n+\n+### ~hint\n+\n+Note: When writing Or statements, you need to use the `|` character. This character is called either a vertical bar or pipe and is usually located below the backspace key.\n+\n+### ~\n+\n+The precedence of operators becomes an issue when your have different operators that aren't separated by parenthesis. Like the case of `bool1 && bool2 || !bool3`. \n+\n+The main take-away from these precedences is that all `&&` operators will be completed before any `||` operators","path":"docs/courses/csintro3/orientation/logic.md","position":132,"original_position":132,"commit_id":"5cd4133b2d307f9adc8e50f4779a01c48942757e","original_commit_id":"5cd4133b2d307f9adc8e50f4779a01c48942757e","user":{"login":"jwunderl","id":5615930,"node_id":"MDQ6VXNlcjU2MTU5MzA=","avatar_url":"https://avatars0.githubusercontent.com/u/5615930?v=4","gravatar_id":"","url":"https://api.github.com/users/jwunderl","html_url":"https://github.com/jwunderl","followers_url":"https://api.github.com/users/jwunderl/followers","following_url":"https://api.github.com/users/jwunderl/following{/other_user}","gists_url":"https://api.github.com/users/jwunderl/gists{/gist_id}","starred_url":"https://api.github.com/users/jwunderl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwunderl/subscriptions","organizations_url":"https://api.github.com/users/jwunderl/orgs","repos_url":"https://api.github.com/users/jwunderl/repos","events_url":"https://api.github.com/users/jwunderl/events{/privacy}","received_events_url":"https://api.github.com/users/jwunderl/received_events","type":"User","site_admin":false},"body":"because I find the whole precedence table to be about equivalent in importance - it's just as / maybe more common to add a ! w/o parens","created_at":"2018-10-05T18:17:49Z","updated_at":"2018-10-05T18:17:49Z","html_url":"https://github.com/jwunderl/pxt-arcade/pull/110#discussion_r223097665","pull_request_url":"https://api.github.com/repos/jwunderl/pxt-arcade/pulls/110","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/jwunderl/pxt-arcade/pulls/comments/223097665"},"html":{"href":"https://github.com/jwunderl/pxt-arcade/pull/110#discussion_r223097665"},"pull_request":{"href":"https://api.github.com/repos/jwunderl/pxt-arcade/pulls/110"}},"in_reply_to_id":223093927},"pull_request":{"url":"https://api.github.com/repos/jwunderl/pxt-arcade/pulls/110","id":220540539,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwNTQwNTM5","html_url":"https://github.com/jwunderl/pxt-arcade/pull/110","diff_url":"https://github.com/jwunderl/pxt-arcade/pull/110.diff","patch_url":"https://github.com/jwunderl/pxt-arcade/pull/110.patch","issue_url":"https://api.github.com/repos/jwunderl/pxt-arcade/issues/110","number":110,"state":"open","locked":false,"title":"Added logic","user":{"login":"ChaseMor","id":13285164,"node_id":"MDQ6VXNlcjEzMjg1MTY0","avatar_url":"https://avatars2.githubusercontent.com/u/13285164?v=4","gravatar_id":"","url":"https://api.github.com/users/ChaseMor","html_url":"https://github.com/ChaseMor","followers_url":"https://api.github.com/users/ChaseMor/followers","following_url":"https://api.github.com/users/ChaseMor/following{/other_user}","gists_url":"https://api.github.com/users/ChaseMor/gists{/gist_id}","starred_url":"https://api.github.com/users/ChaseMor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChaseMor/subscriptions","organizations_url":"https://api.github.com/users/ChaseMor/orgs","repos_url":"https://api.github.com/users/ChaseMor/repos","events_url":"https://api.github.com/users/ChaseMor/events{/privacy}","received_events_url":"https://api.github.com/users/ChaseMor/received_events","type":"User","site_admin":false},"body":"Added logic page","created_at":"2018-10-04T22:54:12Z","updated_at":"2018-10-05T18:17:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"17bd9ac6a6b051829cc9e57d6627fb547b3ff8b0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/jwunderl/pxt-arcade/pulls/110/commits","review_comments_url":"https://api.github.com/repos/jwunderl/pxt-arcade/pulls/110/comments","review_comment_url":"https://api.github.com/repos/jwunderl/pxt-arcade/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jwunderl/pxt-arcade/issues/110/comments","statuses_url":"https://api.github.com/repos/jwunderl/pxt-arcade/statuses/5cd4133b2d307f9adc8e50f4779a01c48942757e","head":{"label":"ChaseMor:js_orien_logic","ref":"js_orien_logic","sha":"5cd4133b2d307f9adc8e50f4779a01c48942757e","user":{"login":"ChaseMor","id":13285164,"node_id":"MDQ6VXNlcjEzMjg1MTY0","avatar_url":"https://avatars2.githubusercontent.com/u/13285164?v=4","gravatar_id":"","url":"https://api.github.com/users/ChaseMor","html_url":"https://github.com/ChaseMor","followers_url":"https://api.github.com/users/ChaseMor/followers","following_url":"https://api.github.com/users/ChaseMor/following{/other_user}","gists_url":"https://api.github.com/users/ChaseMor/gists{/gist_id}","starred_url":"https://api.github.com/users/ChaseMor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChaseMor/subscriptions","organizations_url":"https://api.github.com/users/ChaseMor/orgs","repos_url":"https://api.github.com/users/ChaseMor/repos","events_url":"https://api.github.com/users/ChaseMor/events{/privacy}","received_events_url":"https://api.github.com/users/ChaseMor/received_events","type":"User","site_admin":false},"repo":{"id":148554059,"node_id":"MDEwOlJlcG9zaXRvcnkxNDg1NTQwNTk=","name":"pxt-arcade","full_name":"ChaseMor/pxt-arcade","private":false,"owner":{"login":"ChaseMor","id":13285164,"node_id":"MDQ6VXNlcjEzMjg1MTY0","avatar_url":"https://avatars2.githubusercontent.com/u/13285164?v=4","gravatar_id":"","url":"https://api.github.com/users/ChaseMor","html_url":"https://github.com/ChaseMor","followers_url":"https://api.github.com/users/ChaseMor/followers","following_url":"https://api.github.com/users/ChaseMor/following{/other_user}","gists_url":"https://api.github.com/users/ChaseMor/gists{/gist_id}","starred_url":"https://api.github.com/users/ChaseMor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChaseMor/subscriptions","organizations_url":"https://api.github.com/users/ChaseMor/orgs","repos_url":"https://api.github.com/users/ChaseMor/repos","events_url":"https://api.github.com/users/ChaseMor/events{/privacy}","received_events_url":"https://api.github.com/users/ChaseMor/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ChaseMor/pxt-arcade","description":"Casual game editor based on Microsoft MakeCode","fork":true,"url":"https://api.github.com/repos/ChaseMor/pxt-arcade","forks_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/forks","keys_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/teams","hooks_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/hooks","issue_events_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/issues/events{/number}","events_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/events","assignees_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/assignees{/user}","branches_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/branches{/branch}","tags_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/tags","blobs_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/git/refs{/sha}","trees_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/statuses/{sha}","languages_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/languages","stargazers_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/stargazers","contributors_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/contributors","subscribers_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/subscribers","subscription_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/subscription","commits_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/commits{/sha}","git_commits_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/git/commits{/sha}","comments_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/comments{/number}","issue_comment_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/issues/comments{/number}","contents_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/contents/{+path}","compare_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/merges","archive_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/downloads","issues_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/issues{/number}","pulls_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/pulls{/number}","milestones_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/milestones{/number}","notifications_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/labels{/name}","releases_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/releases{/id}","deployments_url":"https://api.github.com/repos/ChaseMor/pxt-arcade/deployments","created_at":"2018-09-12T23:24:38Z","updated_at":"2018-10-03T21:52:34Z","pushed_at":"2018-10-05T17:40:40Z","git_url":"git://github.com/ChaseMor/pxt-arcade.git","ssh_url":"git@github.com:ChaseMor/pxt-arcade.git","clone_url":"https://github.com/ChaseMor/pxt-arcade.git","svn_url":"https://github.com/ChaseMor/pxt-arcade","homepage":"https://arcade.makecode.com","size":40847,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jwunderl:jsintro","ref":"jsintro","sha":"ed9ca3db571da3b8ef02ea457d84acffa500224e","user":{"login":"jwunderl","id":5615930,"node_id":"MDQ6VXNlcjU2MTU5MzA=","avatar_url":"https://avatars0.githubusercontent.com/u/5615930?v=4","gravatar_id":"","url":"https://api.github.com/users/jwunderl","html_url":"https://github.com/jwunderl","followers_url":"https://api.github.com/users/jwunderl/followers","following_url":"https://api.github.com/users/jwunderl/following{/other_user}","gists_url":"https://api.github.com/users/jwunderl/gists{/gist_id}","starred_url":"https://api.github.com/users/jwunderl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwunderl/subscriptions","organizations_url":"https://api.github.com/users/jwunderl/orgs","repos_url":"https://api.github.com/users/jwunderl/repos","events_url":"https://api.github.com/users/jwunderl/events{/privacy}","received_events_url":"https://api.github.com/users/jwunderl/received_events","type":"User","site_admin":false},"repo":{"id":138115230,"node_id":"MDEwOlJlcG9zaXRvcnkxMzgxMTUyMzA=","name":"pxt-arcade","full_name":"jwunderl/pxt-arcade","private":false,"owner":{"login":"jwunderl","id":5615930,"node_id":"MDQ6VXNlcjU2MTU5MzA=","avatar_url":"https://avatars0.githubusercontent.com/u/5615930?v=4","gravatar_id":"","url":"https://api.github.com/users/jwunderl","html_url":"https://github.com/jwunderl","followers_url":"https://api.github.com/users/jwunderl/followers","following_url":"https://api.github.com/users/jwunderl/following{/other_user}","gists_url":"https://api.github.com/users/jwunderl/gists{/gist_id}","starred_url":"https://api.github.com/users/jwunderl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwunderl/subscriptions","organizations_url":"https://api.github.com/users/jwunderl/orgs","repos_url":"https://api.github.com/users/jwunderl/repos","events_url":"https://api.github.com/users/jwunderl/events{/privacy}","received_events_url":"https://api.github.com/users/jwunderl/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jwunderl/pxt-arcade","description":"Casual game editor based on Microsoft MakeCode","fork":true,"url":"https://api.github.com/repos/jwunderl/pxt-arcade","forks_url":"https://api.github.com/repos/jwunderl/pxt-arcade/forks","keys_url":"https://api.github.com/repos/jwunderl/pxt-arcade/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jwunderl/pxt-arcade/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jwunderl/pxt-arcade/teams","hooks_url":"https://api.github.com/repos/jwunderl/pxt-arcade/hooks","issue_events_url":"https://api.github.com/repos/jwunderl/pxt-arcade/issues/events{/number}","events_url":"https://api.github.com/repos/jwunderl/pxt-arcade/events","assignees_url":"https://api.github.com/repos/jwunderl/pxt-arcade/assignees{/user}","branches_url":"https://api.github.com/repos/jwunderl/pxt-arcade/branches{/branch}","tags_url":"https://api.github.com/repos/jwunderl/pxt-arcade/tags","blobs_url":"https://api.github.com/repos/jwunderl/pxt-arcade/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jwunderl/pxt-arcade/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jwunderl/pxt-arcade/git/refs{/sha}","trees_url":"https://api.github.com/repos/jwunderl/pxt-arcade/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jwunderl/pxt-arcade/statuses/{sha}","languages_url":"https://api.github.com/repos/jwunderl/pxt-arcade/languages","stargazers_url":"https://api.github.com/repos/jwunderl/pxt-arcade/stargazers","contributors_url":"https://api.github.com/repos/jwunderl/pxt-arcade/contributors","subscribers_url":"https://api.github.com/repos/jwunderl/pxt-arcade/subscribers","subscription_url":"https://api.github.com/repos/jwunderl/pxt-arcade/subscription","commits_url":"https://api.github.com/repos/jwunderl/pxt-arcade/commits{/sha}","git_commits_url":"https://api.github.com/repos/jwunderl/pxt-arcade/git/commits{/sha}","comments_url":"https://api.github.com/repos/jwunderl/pxt-arcade/comments{/number}","issue_comment_url":"https://api.github.com/repos/jwunderl/pxt-arcade/issues/comments{/number}","contents_url":"https://api.github.com/repos/jwunderl/pxt-arcade/contents/{+path}","compare_url":"https://api.github.com/repos/jwunderl/pxt-arcade/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jwunderl/pxt-arcade/merges","archive_url":"https://api.github.com/repos/jwunderl/pxt-arcade/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jwunderl/pxt-arcade/downloads","issues_url":"https://api.github.com/repos/jwunderl/pxt-arcade/issues{/number}","pulls_url":"https://api.github.com/repos/jwunderl/pxt-arcade/pulls{/number}","milestones_url":"https://api.github.com/repos/jwunderl/pxt-arcade/milestones{/number}","notifications_url":"https://api.github.com/repos/jwunderl/pxt-arcade/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jwunderl/pxt-arcade/labels{/name}","releases_url":"https://api.github.com/repos/jwunderl/pxt-arcade/releases{/id}","deployments_url":"https://api.github.com/repos/jwunderl/pxt-arcade/deployments","created_at":"2018-06-21T03:34:16Z","updated_at":"2018-10-04T22:32:13Z","pushed_at":"2018-10-05T02:11:06Z","git_url":"git://github.com/jwunderl/pxt-arcade.git","ssh_url":"git@github.com:jwunderl/pxt-arcade.git","clone_url":"https://github.com/jwunderl/pxt-arcade.git","svn_url":"https://github.com/jwunderl/pxt-arcade","homepage":"https://arcade.makecode.com","size":50685,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":29,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":2,"open_issues":29,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jwunderl/pxt-arcade/pulls/110"},"html":{"href":"https://github.com/jwunderl/pxt-arcade/pull/110"},"issue":{"href":"https://api.github.com/repos/jwunderl/pxt-arcade/issues/110"},"comments":{"href":"https://api.github.com/repos/jwunderl/pxt-arcade/issues/110/comments"},"review_comments":{"href":"https://api.github.com/repos/jwunderl/pxt-arcade/pulls/110/comments"},"review_comment":{"href":"https://api.github.com/repos/jwunderl/pxt-arcade/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jwunderl/pxt-arcade/pulls/110/commits"},"statuses":{"href":"https://api.github.com/repos/jwunderl/pxt-arcade/statuses/5cd4133b2d307f9adc8e50f4779a01c48942757e"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"jwunderl"}}