Tell us what’s happening:
I cant find the error, what am i missing?
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
const deleteSong = (id) => {
userData.songs = userData?.songs.filter((song) => {return song.id !== id})
};
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Challenge Information:
Learn Basic String and Array Methods by Building a Music Player - Step 82
1 Like
Everything looks good except that it wants your callback function in the filter() method to use an implicit return. With the curly braces and ‘return’ keyword in there, you’re making it an explicit return. Remove them and it will be implicit.
Note: I sometimes have trouble knowing when to use implicit vs explicit syntax on those callback functions.
2 Likes
Hi!
When you return one line code for callback function, you need implicit return and when more than one line code, you need to explicit return within callback function body {}
.
1 Like
Thanks! I actually solve it because of your help
1 Like