From f7578406249329889ce45472ced16833db1c59e6 Mon Sep 17 00:00:00 2001
From: Eric Elli <32199063+ERElli@users.noreply.github.com>
Date: Thu, 7 May 2020 17:07:48 -0230
Subject: [PATCH] fix(learn): add test to return early pattern (#38751)
* add: test to return early pattern
Currently no test for a = 0 or b = 0. This results in if(a<=0 || b<= 0) also being a valid solution
* fix: typo in test text
* fix: update return early pattern test
Co-authored-by: Shaun Hamilton <51722130+Sky020@users.noreply.github.com>
Co-authored-by: Shaun Hamilton <51722130+Sky020@users.noreply.github.com>
---
.../return-early-pattern-for-functions.english.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/return-early-pattern-for-functions.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/return-early-pattern-for-functions.english.md
index 6e56be0180..6502296197 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/return-early-pattern-for-functions.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/return-early-pattern-for-functions.english.md
@@ -46,7 +46,9 @@ tests:
testString: assert(abTest(2,8) === 18 );
- text: abTest(3,3)
should return 12
testString: assert(abTest(3,3) === 12 );
-
+ - text: abTest(0,0)
should return 0
+ testString: assert(abTest(0,0) === 0);
+
```