const shuffle = () => {
userData.songs.sort(() => Math.random() - 0.5);
};
I’ve become lost. Help, please.
const shuffle = () => {
userData.songs.sort(() => Math.random() - 0.5);
};
I’ve become lost. Help, please.
Hi there!
Post a link to the challenge step.
Isn’t the link at the top of the post, the title? It seems ‘hot’ when I click it, but try this:
Your code doesn’t seem to use optional chaining. In other words, it’s missing the ?
in userData.songs
. Making it userData?.songs
should fix it.
Thanks for pointing to my mistake.