Associative array/Iteration: Difference between revisions

Content added Content deleted
No edit summary
Line 763: Line 763:
io.writeln( key, value )
io.writeln( key, value )
}
}
</lang>

=={{header|Dart}}==
<lang javascript>
main(){
var fruits = {
'apples': 'red',
'oranges': 'orange',
'bananas': 'yellow',
'pears': 'green',
'plums': 'purple'
};

fruits.forEach( (fruits, color) => print( '$fruits are $color' ) );
}

</lang>
</lang>