Lesson Begins with correct code already in place
The lesson already has the correct code in the editor, even though it gives instructions on how to complete it. Tried resetting it and it still starts with the answer in the editor.
<button class="playlist-song-info" onclick="playSong(${song.id})">
<span class="playlist-song-title">${song.title}</span>
<span class="playlist-song-artist">${song.artist}</span>
<span class="playlist-song-duration">${song.duration}</span>
</button>
Learn Basic String and Array Methods by Building a Music Player - Step 31
1 Like
Thank you for catching this issue.
A bug report has been made for this
opened 02:01AM - 22 Dec 23 UTC
type: bug
scope: curriculum
first timers only
### Describe the Issue
For [step 31](https://www.freecodecamp.org/learn/javascr… ipt-algorithms-and-data-structures-v8/learn-basic-string-and-array-methods-by-building-a-music-player/step-31), the answer is already provided for them.
```js
<button class="playlist-song-info" onclick="playSong(${song.id})">
<span class="playlist-song-title">${song.title}</span>
<span class="playlist-song-artist">${song.artist}</span>
<span class="playlist-song-duration">${song.duration}</span>
</button>
```
The starting seed code needs to just be the button element without the onclick.
```js
--fcc-editable-region--
<button class="playlist-song-info">
<span class="playlist-song-title">${song.title}</span>
<span class="playlist-song-artist">${song.artist}</span>
<span class="playlist-song-duration">${song.duration}</span>
</button>
--fcc-editable-region--
```
Here is the file that needs changing
https://github.com/freeCodeCamp/freeCodeCamp/blob/main/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/65672136535209761a5cf02b.md
If you are interested in working on this please read through the contributing docs first
We do not assign issues.
If you are interested, work on the issue and then create a PR for the fix.
Happy coding!
### Affected Page
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-basic-string-and-array-methods-by-building-a-music-player/step-31
### Your code
incorrect start code
```js
<button class="playlist-song-info" onclick="playSong(${song.id})">
<span class="playlist-song-title">${song.title}</span>
<span class="playlist-song-artist">${song.artist}</span>
<span class="playlist-song-duration">${song.duration}</span>
</button>
```
### Expected behavior
This should be the correct starting seed code
```js
--fcc-editable-region--
<button class="playlist-song-info">
<span class="playlist-song-title">${song.title}</span>
<span class="playlist-song-artist">${song.artist}</span>
<span class="playlist-song-duration">${song.duration}</span>
</button>
--fcc-editable-region--
```
### Screenshots
_No response_
### System
- Device: [e.g. iPhone 6, Laptop]
- OS: [e.g. iOS 14, Windows 10, Ubuntu 20.04]
- Browser: [e.g. Chrome, Safari]
- Version: [e.g. 22]
### Additional context
_No response_
1 Like
system
Closed
June 21, 2024, 2:01pm
3
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.