From 2f389b51b7491ccbce7c1e41f3b38dbc3be84f11 Mon Sep 17 00:00:00 2001 From: tsbugbee Date: Sun, 5 Apr 2020 12:20:35 -0400 Subject: [PATCH 1/2] New JS Question --- 04 - JS/difference-between-==-and-===-in-JS.md | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 04 - JS/difference-between-==-and-===-in-JS.md diff --git a/04 - JS/difference-between-==-and-===-in-JS.md b/04 - JS/difference-between-==-and-===-in-JS.md deleted file mode 100644 index dce5ff2..0000000 --- a/04 - JS/difference-between-==-and-===-in-JS.md +++ /dev/null @@ -1,12 +0,0 @@ -== is used to check for relative equality, whereas === is used to check for strict equality. - -In other words, the string '2' will evalutae to true when compared to the integer data type for 2 for equality. - -=== will check to see if the contents AND data type are the same, so since a string and an integer aren't the same, it would -evaluate to false. - -TLDR: - -'2' == 2 will evaluate to True, since the contents are the same - -'2' === 2 will evaluate to False, since the data types are different. \ No newline at end of file From 40802b5ae15c270dfa1a35b22735ef1da7f4a7af Mon Sep 17 00:00:00 2001 From: tsbugbee Date: Sun, 5 Apr 2020 12:23:06 -0400 Subject: [PATCH 2/2] New JS Question --- .../difference-between-==-and-===-in-JS - Copy.md | 12 ++++++++++++ ...bewteen-while-and-do-while-loops-in-javascript.md | 5 +++++ 2 files changed, 17 insertions(+) create mode 100644 04 - JS/difference-between-==-and-===-in-JS - Copy.md create mode 100644 04 - JS/what-is-the-difference-bewteen-while-and-do-while-loops-in-javascript.md diff --git a/04 - JS/difference-between-==-and-===-in-JS - Copy.md b/04 - JS/difference-between-==-and-===-in-JS - Copy.md new file mode 100644 index 0000000..dce5ff2 --- /dev/null +++ b/04 - JS/difference-between-==-and-===-in-JS - Copy.md @@ -0,0 +1,12 @@ +== is used to check for relative equality, whereas === is used to check for strict equality. + +In other words, the string '2' will evalutae to true when compared to the integer data type for 2 for equality. + +=== will check to see if the contents AND data type are the same, so since a string and an integer aren't the same, it would +evaluate to false. + +TLDR: + +'2' == 2 will evaluate to True, since the contents are the same + +'2' === 2 will evaluate to False, since the data types are different. \ No newline at end of file diff --git a/04 - JS/what-is-the-difference-bewteen-while-and-do-while-loops-in-javascript.md b/04 - JS/what-is-the-difference-bewteen-while-and-do-while-loops-in-javascript.md new file mode 100644 index 0000000..d224647 --- /dev/null +++ b/04 - JS/what-is-the-difference-bewteen-while-and-do-while-loops-in-javascript.md @@ -0,0 +1,5 @@ +A while loop will only begin to execute if the conditional statement in the while statement is true. + +A do while loop will always execute its contents at least once, regardless of whether the conditional statement is true. + +In other words, a while loop checks the conditional statement at the beginning of the loop, while a do while loop will check the statement at the end. \ No newline at end of file