Trials now contains another 60 trials, these are the ambiguity trials
The final step is to shuffle them, we use a 'fisher-yates' shuffle:
`
shuffle=(a)=>{
for(leti=a.length-1;i>0;i--){
constj=Math.floor(Math.random()*(i+1));
[a[i],a[j]]=[a[j],a[i]];
}
returna;
}
md`the final step is shuffling the trials`
shuffle(trials)
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.