fix(curriculum): Attribute order shouldn't matter Music Player (#53541)

This commit is contained in:
Duong The Pham
2024-02-05 08:59:15 -08:00
committed by GitHub
parent 4a0519e7a6
commit c13c554353
@@ -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--