From 1d76f2e8dd7908078c24811cb40ba4adc89f8d5a Mon Sep 17 00:00:00 2001 From: TefiC Date: Sat, 23 Jun 2018 16:26:38 -0400 Subject: [PATCH] Added conditional to check if the argument is a string --- Functions.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Functions.js b/Functions.js index 0e1e44e..c727506 100644 --- a/Functions.js +++ b/Functions.js @@ -1,3 +1,5 @@ function returnLength(string1) { - return string1.length(); + if(typeof string1 == "string") { + return string1.length(); + } } \ No newline at end of file