Nice! The counter will come in handy when accessing the prices stored in the array.
Make sure the loop looks like for(var i = 0; i < arr.length; i++){ and has } on the next line.
for(var i = 0; i < arr.length; i++){
}