From ef86d7bd610f3886b2023422a01dc5930b4d3b86 Mon Sep 17 00:00:00 2001
From: Lauren Van Sloun <33039504+Ashera138@users.noreply.github.com>
Date: Tue, 12 Mar 2019 18:05:22 -0400
Subject: [PATCH] Fixed typo in JavaScript curriculum (#34820)
* Fixed typo in JavaScript curriculum
* Added missing period at end of sentence
---
.../basic-javascript/add-two-numbers-with-javascript.english.md | 2 +-
...standing-undefined-value-returned-from-a-function.english.md | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/add-two-numbers-with-javascript.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/add-two-numbers-with-javascript.english.md
index 22339b03d0..62629c0008 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/add-two-numbers-with-javascript.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/add-two-numbers-with-javascript.english.md
@@ -9,7 +9,7 @@ videoUrl: 'https://scrimba.com/c/cM2KBAG'
Number
is a data type in JavaScript which represents numeric data.
Now let's try to add two numbers using JavaScript.
-JavaScript uses the +
symbol as an addition operation when placed between two numbers.
+JavaScript uses the +
symbol as an addition operator when placed between two numbers.
Example:
myVar = 5 + 10; // assigned 15
return
statement but it does not have to. In the case that the function doesn't have a return
statement, when you call it, the function processes the inner code but the returned value is undefined
.
Example
var sum = 0;-
function addSum(num) {
sum = sum + num;
}
var returnedValue = addSum(3); // sum will be modified but returned value is undefined
addSum
is a function without a return
statement. The function will change the global sum
variable but the returned value of the function is undefined
+addSum
is a function without a return
statement. The function will change the global sum
variable but the returned value of the function is undefined
.
## Instructions