From 4646c2a1cb873772d7d8a160851dbd7e44724fc6 Mon Sep 17 00:00:00 2001 From: Israel Lopez Date: Wed, 31 Jan 2024 00:08:50 -0600 Subject: [PATCH] fix(curriculum): remove unnecessary optional chaining (#53467) --- .../65572399a8e16d50bc2c1ff3.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/65572399a8e16d50bc2c1ff3.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/65572399a8e16d50bc2c1ff3.md index 6d9ece3200f..0ef1c8d130b 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/65572399a8e16d50bc2c1ff3.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/65572399a8e16d50bc2c1ff3.md @@ -7,7 +7,7 @@ dashedName: step-76 # --description-- -If there is a match then set `userData?.currentSong` to `null` and `userData?.songCurrentTime` to `0`. +If there is a match then set `userData.currentSong` to `null` and `userData.songCurrentTime` to `0`. After that, call the `pauseSong()` function to stop the playback and the `setPlayerDisplay()` function to update the player display. @@ -19,13 +19,13 @@ You should not modify the existing `if` statement and its content. assert.match(code, /if\s*\(userData\?\.currentSong\?\.id\s*===\s*id\)\s*\{\s*.*\s*.*\s*.*\s*.*\s*\}/) ``` -You should set `userData?.currentSong` to `null`. +You should set `userData.currentSong` to `null`. ```js assert.match(code, /if\s*\(userData\?\.currentSong\?\.id\s*===\s*id\)\s*\{\s*userData\.currentSong\s*=\s*null;?\s*.*\s*.*\s*.*\s*\}/) ``` -You should set `userData?.songCurrentTime` to `0`. +You should set `userData.songCurrentTime` to `0`. ```js assert.match(code, /if\s*\(userData\?\.currentSong\?\.id\s*===\s*id\)\s*\{\s*userData\.currentSong\s*=\s*null;?\s*userData\.songCurrentTime\s*=\s*0;?\s*.*\s*.*\s*\}/)