You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's nothing wrong with your while loop (especially since it works), but it might be a little simpler to reason about a more standard array .map (since that's more "idiomatic" React). If you only want to render a certain number of things from the array the simplest solution might be to slice the array before mapping:
week5-Joe-Maria/week5-joe-maria/src/ShowQuiz.jsx
Line 77 in 1c5e3d2
There's nothing wrong with your while loop (especially since it works), but it might be a little simpler to reason about a more standard array
.map
(since that's more "idiomatic" React). If you only want to render a certain number of things from the array the simplest solution might be to slice the array before mapping:That way you don't have to mess around with indexes and stuff
I may not have fully understood what the
while
was doing so apologies if my suggestion is nonsense 😅The text was updated successfully, but these errors were encountered: