Fixed typo in JavaScript curriculum (#34820)
* Fixed typo in JavaScript curriculum * Added missing period at end of sentence
This commit is contained in:
committed by
Randell Dawson
parent
0ffdae1093
commit
ef86d7bd61
@ -9,7 +9,7 @@ videoUrl: 'https://scrimba.com/c/cM2KBAG'
|
||||
<section id='description'>
|
||||
<code>Number</code> is a data type in JavaScript which represents numeric data.
|
||||
Now let's try to add two numbers using JavaScript.
|
||||
JavaScript uses the <code>+</code> symbol as an addition operation when placed between two numbers.
|
||||
JavaScript uses the <code>+</code> symbol as an addition operator when placed between two numbers.
|
||||
<strong>Example:</strong>
|
||||
<blockquote>myVar = 5 + 10; // assigned 15</blockquote>
|
||||
</section>
|
||||
|
@ -10,7 +10,7 @@ videoUrl: 'https://scrimba.com/c/ce2p7cL'
|
||||
A function can include the <code>return</code> statement but it does not have to. In the case that the function doesn't have a <code>return</code> statement, when you call it, the function processes the inner code but the returned value is <code>undefined</code>.
|
||||
<strong>Example</strong>
|
||||
<blockquote>var sum = 0;<br>function addSum(num) {<br> sum = sum + num;<br>}<br>var returnedValue = addSum(3); // sum will be modified but returned value is undefined</blockquote>
|
||||
<code>addSum</code> is a function without a <code>return</code> statement. The function will change the global <code>sum</code> variable but the returned value of the function is <code>undefined</code>
|
||||
<code>addSum</code> is a function without a <code>return</code> statement. The function will change the global <code>sum</code> variable but the returned value of the function is <code>undefined</code>.
|
||||
</section>
|
||||
|
||||
## Instructions
|
||||
|
Reference in New Issue
Block a user