From 634c4e55d04eda1fb6068eab8a929cb9e14651af Mon Sep 17 00:00:00 2001 From: Guilherme Vieira Date: Wed, 7 Dec 2022 00:57:33 -0300 Subject: [PATCH] This answer doesn't work // I believe this is the right answer: return a.slice(0, a.length / 2) --- Javascript Basics/Extract first half of string.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Javascript Basics/Extract first half of string.js b/Javascript Basics/Extract first half of string.js index b7c426e..6c865e7 100644 --- a/Javascript Basics/Extract first half of string.js +++ b/Javascript Basics/Extract first half of string.js @@ -3,5 +3,5 @@ // Return the result function myFunction(a) { - return a.slice(a.count / 2) + return a.slice(0, a.length / 2) }