One of the variables uses let as a carryover from the original solution adapted from.
This variable is never reassigned, so would be better declared with const.
A tiny pedantic change but since the rest of the function's non-reassigned variables are declared with const, this keeps things consistent and prevents any "why use let here and const there?" confusions from learners.
This PR
Changes a non-reassigned variable to be declared via const instead of let
Because
One of the variables uses
let
as a carryover from the original solution adapted from. This variable is never reassigned, so would be better declared withconst
. A tiny pedantic change but since the rest of the function's non-reassigned variables are declared withconst
, this keeps things consistent and prevents any "why use let here and const there?" confusions from learners.This PR
const
instead oflet
Issue
N/A
Additional Information
Pull Request Requirements
location of change: brief description of change
format, e.g.01_helloWorld: Update test cases
Because
section summarizes the reason for this PRThis PR
section has a bullet point list describing the changes in this PRIssue
section/solutions
folder