From 461c852f98cfc38fd0d81ea4a3067982ebab8769 Mon Sep 17 00:00:00 2001 From: MaoShizhong <122839503+MaoShizhong@users.noreply.github.com> Date: Sun, 3 Mar 2024 01:44:34 +0000 Subject: [PATCH] Use const for palindrome solution variable (#439) --- 09_palindromes/solution/palindromes-solution.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/09_palindromes/solution/palindromes-solution.js b/09_palindromes/solution/palindromes-solution.js index b731371..01fc46f 100644 --- a/09_palindromes/solution/palindromes-solution.js +++ b/09_palindromes/solution/palindromes-solution.js @@ -1,6 +1,6 @@ const palindromes = function (string) { // Since we only consider letters and numbers, create a variable containing all valid characters - let alphanumerical = 'abcdefghijklmnopqrstuvwxyz0123456789'; + const alphanumerical = 'abcdefghijklmnopqrstuvwxyz0123456789'; // Convert to lowercase, split to array of individual characters, filter only valid characters, then rejoin as new string const cleanedString = string