From 5b4b6575c5a5c366c46ddf98709675ef2e4cbb3f Mon Sep 17 00:00:00 2001 From: Joshua Enahoro <29558148+joshuaenahoro@users.noreply.github.com> Date: Fri, 7 Aug 2026 21:26:22 +0100 Subject: [PATCH] refactor: remove unnecessary string conversion for note ID Removes the unnecessary `String()` conversion when assigning the note ID in `noteObject`. `notes.length + 1` already produces a number, and the application uses numeric IDs, so the conversion is redundant. --- src/content/2/en/part2b.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/2/en/part2b.md b/src/content/2/en/part2b.md index 711b5c3f076..5c7f2a810c8 100644 --- a/src/content/2/en/part2b.md +++ b/src/content/2/en/part2b.md @@ -235,7 +235,7 @@ const addNote = (event) => { const noteObject = { content: newNote, important: Math.random() < 0.5, - id: String(notes.length + 1), + id: notes.length + 1, } setNotes(notes.concat(noteObject))