educative.io

For-In form in Solution to Only Even problem in Dart

In the previous lesson we learned about the for-in form. Is there are reason you couldn’t solve this using for-in? That’s what I tried, but “i” was not recognized when I did it that way.

Hi Chris,

To be able to help you, you should post what you have written.
But you can make it work with a for-in form. It works. use the following :

for(var i in integers)
{
/*Code here */
}

I hope it will help you if you still struggle here
Have a good day