Last active
May 12, 2017 04:13
Revisions
-
Todd Newent revised this gist
May 12, 2017 . 1 changed file with 0 additions and 30 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,33 +1,3 @@ # JavaScipt Operators, let's start... * [An overview of operators](#6124386597) -
Todd Newent revised this gist
May 12, 2017 . 1 changed file with 17 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,19 @@ <div class="js-toggler-container js-social-container starring-container "> <!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/ToddNewent/121db85d12d23d6450841556c29a8faa/unstar" class="starred" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="roSwcHRdCcQWhuAn+i4MH0oUtFDXTUoh5Gaq529st4c+13Qw3GCl9PN6y0IUoL3bJd4vTfZMHGA1zO/Dysg2Cg==" /></div> <button type="submit" class="btn btn-sm btn-with-count js-toggler-target" aria-label="Unstar this gist" title="Unstar ToddNewent/121db85d12d23d6450841556c29a8faa" data-ga-click="Repository, click unstar button, action:gists/gists#show; text:Unstar"> <svg aria-hidden="true" class="octicon octicon-star" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74z"/></svg> Unstar </button> <a class="social-count js-social-count" href="/ToddNewent/121db85d12d23d6450841556c29a8faa/stargazers" aria-label="0 users starred this repository"> 0 </a> </form> <!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/ToddNewent/121db85d12d23d6450841556c29a8faa/star" class="unstarred" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="laJjVFwqzjEMcQ7syM/MBuaGcbSzrkKbTYcR2UDFL6me6h7QqRhCO7B79UhvAhyL6fB0DtN5eAL4dMfgiZOOLw==" /></div> <button type="submit" class="btn btn-sm btn-with-count js-toggler-target" @@ -11,7 +26,7 @@ aria-label="0 users starred this repository"> 0 </a> </form> </div> # JavaScipt Operators, let's start... -
Todd Newent revised this gist
May 12, 2017 . No changes.There are no files selected for viewing
-
Todd Newent revised this gist
May 12, 2017 . 1 changed file with 2 additions and 40 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,36 +1,4 @@ <form accept-charset="UTF-8" action="/ToddNewent/121db85d12d23d6450841556c29a8faa/star" class="unstarred" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="laJjVFwqzjEMcQ7syM/MBuaGcbSzrkKbTYcR2UDFL6me6h7QqRhCO7B79UhvAhyL6fB0DtN5eAL4dMfgiZOOLw==" /></div> <button type="submit" class="btn btn-sm btn-with-count js-toggler-target" @@ -43,13 +11,7 @@ aria-label="0 users starred this repository"> 0 </a> </form> # JavaScipt Operators, let's start... -
Todd Newent revised this gist
May 12, 2017 . 1 changed file with 24 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,21 @@ <ul class="pagehead-actions"> <li> <a href="/ToddNewent/121db85d12d23d6450841556c29a8faa/edit" aria-label="Edit this Gist" class="btn btn-sm" rel="nofollow"> <svg aria-hidden="true" class="octicon octicon-pencil" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M0 12v3h3l8-8-3-3-8 8zm3 2H1v-2h1v1h1v1zm10.3-9.3L12 6 9 3l1.3-1.3a.996.996 0 0 1 1.41 0l1.59 1.59c.39.39.39 1.02 0 1.41z"/></svg> Edit </a> </li> <li> <!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/ToddNewent/121db85d12d23d6450841556c29a8faa" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="_method" type="hidden" value="delete" /><input name="authenticity_token" type="hidden" value="AHnXR1ohxU2AtlVXgEZi9fN3SGloSVE2REzqknAnmxEA+4Ib07KxGPH77trkkw1j9CPSnF2YjUzFaaIqZgReDg==" /></div> <button type="submit" class="btn btn-sm btn-danger" aria-label="Delete this Gist" data-confirm="Are you positive you want to delete this Gist?"> <svg aria-hidden="true" class="octicon octicon-trashcan" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M11 2H9c0-.55-.45-1-1-1H5c-.55 0-1 .45-1 1H2c-.55 0-1 .45-1 1v1c0 .55.45 1 1 1v9c0 .55.45 1 1 1h7c.55 0 1-.45 1-1V5c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm-1 12H3V5h1v8h1V5h1v8h1V5h1v8h1V5h1v9zm1-10H2V3h9v1z"/></svg> Delete </button> </form> </li> <li> <div class="js-toggler-container js-social-container starring-container "> <!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/ToddNewent/121db85d12d23d6450841556c29a8faa/unstar" class="starred" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="roSwcHRdCcQWhuAn+i4MH0oUtFDXTUoh5Gaq529st4c+13Qw3GCl9PN6y0IUoL3bJd4vTfZMHGA1zO/Dysg2Cg==" /></div> <button type="submit" @@ -28,6 +45,12 @@ </a> </form> </div> </li> </ul> # JavaScipt Operators, let's start... * [An overview of operators](#6124386597) -
Todd Newent revised this gist
May 12, 2017 . 1 changed file with 22 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,32 @@ <div class="js-toggler-container js-social-container starring-container "> <!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/ToddNewent/121db85d12d23d6450841556c29a8faa/unstar" class="starred" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="roSwcHRdCcQWhuAn+i4MH0oUtFDXTUoh5Gaq529st4c+13Qw3GCl9PN6y0IUoL3bJd4vTfZMHGA1zO/Dysg2Cg==" /></div> <button type="submit" class="btn btn-sm btn-with-count js-toggler-target" aria-label="Unstar this gist" title="Unstar ToddNewent/121db85d12d23d6450841556c29a8faa" data-ga-click="Repository, click unstar button, action:gists/gists#show; text:Unstar"> <svg aria-hidden="true" class="octicon octicon-star" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74z"/></svg> Unstar </button> <a class="social-count js-social-count" href="/ToddNewent/121db85d12d23d6450841556c29a8faa/stargazers" aria-label="0 users starred this repository"> 0 </a> </form> <!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/ToddNewent/121db85d12d23d6450841556c29a8faa/star" class="unstarred" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="laJjVFwqzjEMcQ7syM/MBuaGcbSzrkKbTYcR2UDFL6me6h7QqRhCO7B79UhvAhyL6fB0DtN5eAL4dMfgiZOOLw==" /></div> <button type="submit" class="btn btn-sm btn-with-count js-toggler-target" aria-label="Star this gist" title="Star ToddNewent/121db85d12d23d6450841556c29a8faa" data-ga-click="Repository, click star button, action:gists/gists#show; text:Star"> <svg aria-hidden="true" class="octicon octicon-star" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74z"/></svg> Star </button> <a class="social-count js-social-count" href="/ToddNewent/121db85d12d23d6450841556c29a8faa/stargazers" aria-label="0 users starred this repository"> 0 </a> </form> </div> # JavaScipt Operators, let's start... -
Todd Newent revised this gist
May 12, 2017 . 1 changed file with 9 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,12 @@ <button type="submit" class="btn btn-sm btn-with-count js-toggler-target" aria-label="Star this gist" title="Star ToddNewent/121db85d12d23d6450841556c29a8faa" data-ga-click="Repository, click star button, action:gists/gists#show; text:Star"> <svg aria-hidden="true" class="octicon octicon-star" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74z"/></svg> Star </button> # JavaScipt Operators, let's start... * [An overview of operators](#6124386597) -
Todd Newent renamed this gist
May 12, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Todd Newent revised this gist
May 12, 2017 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -127,9 +127,9 @@ You may notice that all of JavaScript's arithmatic and bitwise operators can be | Syntax | Type | | ---------------------------- |:------------------------------------------:| | <code> (a) </code> | Grouping | | <code> a.b </code> | Member Access | | <code> a[b] </code> | Computed Member Access | | <code> new a(b) </code> | new, with arguments | | <code> a(b) </code> | Function Call | | <code> new a </code> | new, without arguments | -
Todd Newent revised this gist
May 12, 2017 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -127,9 +127,9 @@ You may notice that all of JavaScript's arithmatic and bitwise operators can be | Syntax | Type | | ---------------------------- |:------------------------------------------:| | <code> (a) </code> | Grouping | | <code> a.b </code> | Member Access | | <code> a[b] </code> | Computed Member Access | | <code> new a(b) </code> | new, with arguments | | <code> a(b) </code> | Function Call | | <code> new a </code> | new, without arguments | -
Todd Newent revised this gist
May 12, 2017 . 1 changed file with 14 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,19 @@ # JavaScipt Operators, let's start... * [An overview of operators](#6124386597) * [Our first operator, the addition operator.](#2164378451) * [Precedence, in what order do we operate?](#6235986754) * [Types of operators in JavaScript](#2154683594) * [Assignment operators](#6431578477) * [Comparison operators](#2154877747) * [Arithmetic operators](#6532985744) * [Bitwise operators](#9666985874) * [Logical operators](#2154217747) * [String operators](#9666584745) * [Conditional (ternary) operator](#9666587478) * [Comma operator](#9999858958) * [Unary operators](#6457845755) * [Relational operator](#9996585968) <a name="1"></a> ## An overview of operators -
Todd Newent renamed this gist
May 12, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Todd Newent revised this gist
May 12, 2017 . 1 changed file with 7 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,11 @@ # JavaScipt Operators, let's start... * [An overview of operators](#1) * [Our first operator, the addition operator.](#2) * [Precedence, in what order do we operate?](#3) * [Types of operators in JavaScript](#4) * [Arithmatic Operators](#5) <a name="1"></a> ## An overview of operators @@ -39,10 +42,10 @@ Operators have a precedence, this is the order in which they are executed. We le The multiplication operator '*' has a higher precedence than the addtion '+' operator. In example 3. JavaScript will multiply 2 and 3, then add 1. Hence the varible b evaluates to 7. <a name="4"></a> ## Types of operators in JavaScript <a name="5"></a> ### Arithmatic Operators -
Todd Newent revised this gist
May 12, 2017 . 1 changed file with 3 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,8 @@ # JavaScipt Operators, let's start... * [An overview of operators](#1) * [An overview of operators](#2) * [Precedence, in what order do we operate?](#3) <a name="1"></a> ## An overview of operators -
Todd Newent revised this gist
May 12, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ ⋅⋅* Unordered sub-list. 1. [An overview of operators](#1) ..* [An overview of operators](#2) 2. [Precedence, in what order do we operate?](#3) <a name="1"></a> -
Todd Newent revised this gist
May 12, 2017 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,9 @@ # JavaScipt Operators, let's start... 1. First ordered list item 2. Another item ⋅⋅* Unordered sub-list. 1. [An overview of operators](#1) ..* [An overview of operators](#2) 2. [Precedence, in what order do we operate?](#3) -
Todd Newent revised this gist
May 12, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ # JavaScipt Operators, let's start... 1. [An overview of operators](#1) ..* [An overview of operators](#2) 2. [Precedence, in what order do we operate?](#3) <a name="1"></a> -
Todd Newent revised this gist
May 12, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # JavaScipt Operators, let's start... 1. [An overview of operators](#1) ..+ [An overview of operators](#2) 2. [Precedence, in what order do we operate?](#3) -
Todd Newent revised this gist
May 12, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ # JavaScipt Operators, let's start... + [An overview of operators](#1) ..+ [An overview of operators](#2) 2. [Precedence, in what order do we operate?](#3) <a name="1"></a> -
Todd Newent revised this gist
May 12, 2017 . 1 changed file with 7 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,13 @@ # JavaScipt Operators, let's start... + [An overview of operators](#1) .. + [An overview of operators](#2) 2. [Precedence, in what order do we operate?](#3) <a name="1"></a> ## An overview of operators <a name="2"></a> ### Our first operator, the addition operator. @@ -25,7 +27,7 @@ Here is an example of the addition operator. It looks familiar to normal arithma // where c is the sum of a and b ``` <a name="3"></a> ### Precedence, in what order do we operate? -
Todd Newent revised this gist
May 12, 2017 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,8 +2,8 @@ ## An overview of operators 1. [Our first operator, the addition operator.](#1) 2. [Precedence, in what order do we operate?](#2) <a name="1"></a> ### Our first operator, the addition operator. -
Todd Newent revised this gist
May 12, 2017 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,10 @@ ## An overview of operators [Our first operator, the addition operator.](http://...#1) [Precedence, in what order do we operate?](http://...#2) <a name="1"></a> ### Our first operator, the addition operator. @@ -21,7 +25,7 @@ Here is an example of the addition operator. It looks familiar to normal arithma // where c is the sum of a and b ``` <a name="2"></a> ### Precedence, in what order do we operate? -
Todd Newent revised this gist
May 12, 2017 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ # JavaScipt Operators, let's start... ## An overview of operators ### Our first operator, the addition operator. @@ -33,6 +34,9 @@ Operators have a precedence, this is the order in which they are executed. We le The multiplication operator '*' has a higher precedence than the addtion '+' operator. In example 3. JavaScript will multiply 2 and 3, then add 1. Hence the varible b evaluates to 7. ## Types of operators in JavaScript ### Arithmatic Operators -
Todd Newent revised this gist
May 12, 2017 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,6 +20,7 @@ Here is an example of the addition operator. It looks familiar to normal arithma // where c is the sum of a and b ``` ### Precedence, in what order do we operate? @@ -31,6 +32,10 @@ Operators have a precedence, this is the order in which they are executed. We le The multiplication operator '*' has a higher precedence than the addtion '+' operator. In example 3. JavaScript will multiply 2 and 3, then add 1. Hence the varible b evaluates to 7. ### Arithmatic Operators Let's list JavaScript's arithmetical operators and place them in order of their precedence... | Syntax | Type | -
Todd Newent revised this gist
May 12, 2017 . 1 changed file with 29 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -32,6 +32,19 @@ Operators have a precedence, this is the order in which they are executed. We le The multiplication operator '*' has a higher precedence than the addtion '+' operator. In example 3. JavaScript will multiply 2 and 3, then add 1. Hence the varible b evaluates to 7. Let's list JavaScript's arithmetical operators and place them in order of their precedence... | Syntax | Type | | ---------------------------- |:------------------------------------------:| | <code> a++ </code> | Postfix Incrument | | <code> a-- </code> | Postfix Decriment | | <code> ++a </code> | Prefix Increment | | <code> --a </code> | Prefix Decrement | | <code> a ** b </code> | Exponentiation | | <code> a * b </code> | Multiplication | | <code> a / b </code> | Division | | <code> a % b </code> | Remainder | | <code> a + b </code> | Addition | | <code> a - b </code> | Subtraction | Incruments and decrements operators simply increase or decrease the value of a by 1, the difference between the postfix and prefix is when this operator is applied. @@ -59,6 +72,22 @@ We have already used the assigment operator within this gist, in its most basic Let's list JavaScript's assigment operators and place them in order of their precidence... | Syntax | Type | | ---------------------------- |:------------------------------------------:| | <code> a = b </code> | Assignment | | <code> a += b </code> | Addition Assigment | | <code> a -= b </code> | Subtraction Assigment | | <code> a \*\*= b </code> | Exponential Assigment | | <code> a \*= b </code> | Multiplcation Assigment | | <code> a /= b </code> | Division Assigment | | <code> a %= b </code> | Remainder Assigment | | <code> a <<= b </code> | Bitwise Left Shift Assigment | | <code> a >>= b </code> | Bitwise Right shift Assigment | | <code> a >>>= b </code> | Bitwise Unsigned Right shift Assigment | | <code> a &= b </code> | Bitwise AND Assigment | | <code> a ^= b </code> | Bitwise XOR Assigment | | <code> a \|= b </code> | Bitwise OR Assigment | You may notice that all of JavaScript's arithmatic and bitwise operators can be used as a prefixes for the assigment opperator. All of these prefixes cause the assigment operator to be evaluated in the same way. This can demonstrated as such... ``` -
Todd Newent revised this gist
May 12, 2017 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,6 +3,7 @@ ### Our first operator, the addition operator. Let's start with an example ``` @@ -48,7 +49,7 @@ Incruments and decrements operators simply increase or decrease the value of a b // In this case b = 2 and a = 2 ``` This demonstrates that postfixs are applied after a variable is evaluated, prefixes are applied before a varible is evaluated. ### Assignment operators @@ -57,8 +58,7 @@ Example 4. and 5. demonstrate that postfixs are applied after a variable is eval We have already used the assigment operator within this gist, in its most basic form we use the = symbol for the assigment operator. This operator assignes a value to a varible, in turn creating a value pair that maps a name to a unique value and holds it in memory. Let's list JavaScript's assigment operators and place them in order of their precidence... You may notice that all of JavaScript's arithmatic and bitwise operators can be used as a prefixes for the assigment opperator. All of these prefixes cause the assigment operator to be evaluated in the same way. This can demonstrated as such... ``` -
Todd Newent revised this gist
May 12, 2017 . 1 changed file with 6 additions and 16 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,22 +22,17 @@ Here is an example of the addition operator. It looks familiar to normal arithma ### Precedence, in what order do we operate? Operators have a precedence, this is the order in which they are executed. We learn of this principle in early arithmatic classes, if you are familiar with BIDMAS then you are also familar with basic operator precedence. ``` var b = 1 + 2 * 3; ``` The multiplication operator '*' has a higher precedence than the addtion '+' operator. In example 3. JavaScript will multiply 2 and 3, then add 1. Hence the varible b evaluates to 7. Let's list JavaScript's arithmetical operators and place them in order of their precedence... Incruments and decrements operators simply increase or decrease the value of a by 1, the difference between the postfix and prefix is when this operator is applied. ``` // Postfix @@ -53,23 +48,18 @@ difference between the postfix and prefix is when this operator is applied. // In this case b = 2 and a = 2 ``` Example 4. and 5. demonstrate that postfixs are applied after a variable is evaluated, prefixes are applied before a varible is evaluated. ### Assignment operators We have already used the assigment operator within this gist, in its most basic form we use the = symbol for the assigment operator. This operator assignes a value to a varible, in turn creating a value pair that maps a name to a unique value and holds it in memory. Let's list JavaScript's assigment operators and place them in order of their precidence... You may notice that all of JavaScript's arithmatic and bitwise operators can be used as a prefixes for the assigment opperator. All of these prefixes cause the assigment operator to be evaluated in the same way. This can demonstrated as such... ``` var a += b; -
Todd Newent revised this gist
May 12, 2017 . No changes.There are no files selected for viewing
-
Todd Newent revised this gist
May 12, 2017 . 1 changed file with 1 addition and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,11 +9,7 @@ Let's start with an example var a = 1 + 1; ``` Here is an example of the addition operator. It looks familiar to normal arithmatic because JavaScipt uses infix notation, such that the operator '+' is placed inbetween its parameters. If you are familiar with JavaScripts function notation, it may help to think of operators as a special set of functions, written syntactically different than then normal function notation. ``` function +(a, b){ -
Todd Newent revised this gist
May 12, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # JavaScipt Operators, let's start... ### Our first operator, the addition operator.
NewerOlder