I have a react function with a ul-element and 4 Listitems. I want to randomize the order of the list items, but I cant think about the easiest way.
export default function Card({ question, answer, incorrect, headlinecount }) {
return (
<CardStyle>
<article>
<h2>Question {headlinecount}</h2>
<p>{question}</p>
</article>
<ChoiceStyle>
<li>{incorrect[0]}</li>
<li>{answer}</li>
<li>{incorrect[1]}</li>
<li>{incorrect[2]}</li>
</ChoiceStyle>
<ButtonDiv>
<button type="button">Show Answer</button>
<p>{answer}</p>
</ButtonDiv>
</CardStyle>
);
}