shuffledQuestions=questions.sort=>(Math.random() -0.5)
can someone help please
>Solution :
You need to pass in a function to Array::sort
The correct format for arrow functions is () => {}
const questions = ['What is your name?', 'What is your quest?', 'What is your favorite color?'];
//shuffle the array
questions.sort(() => Math.random() - 0.5);
console.table(questions);
You can learn more about arrow functions here https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions