mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-10-24 02:07:00 +08:00
fix(curriculum): Attribute order shouldn't matter Music Player (#53541)
This commit is contained in:
+3
-3
@@ -7,14 +7,14 @@ dashedName: step-77
|
||||
|
||||
# --description--
|
||||
|
||||
Within the button element in the `renderSongs` function, add an `onclick` attribute as the first attribute. For the value, call the `deleteSong` function and interpolate `song.id`.
|
||||
Within the button element in the `renderSongs` function, add an `onclick` attribute. For the value, call the `deleteSong` function and interpolate `song.id`.
|
||||
|
||||
# --hints--
|
||||
|
||||
You should add an `onclick` attribute as the first attribute of the delete button and pass in `deleteSong(${song.id})`.
|
||||
You should add an `onclick` attribute to the delete button and pass in `deleteSong(${song.id})`.
|
||||
|
||||
```js
|
||||
assert.match(code, /<button\s+onclick=('|")deleteSong\(\s*\$\{song\.id\}\s*\)\1\s*class=('|")playlist-song-delete\2\s*aria-label=('|")Delete\s*\$\{song\.title\}\3\s*>/)
|
||||
assert.match(code, /<button(?:\s+|\s+.*\s+)onclick\s*=\s*('|")deleteSong\(\s*\$\{song\.id\}\s*\)\1(?:\s+.*|)>/)
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user