i didn't know where i should post my question.. I am stuck at 9th stage of task 250.
Here is my handler.js file:
`export const handleKeyPress = (term, state) => {
return (name, matches, data) => {
data.code = String.fromCharCode(data.code);
if (data.code == 'G' || data.code == 'g') {
state.gold++;
updateGold(term, state);
} else {
for (let i = 0; i < state.producers.length; i++) {
if (data.code == String(state.producers.id)) {
if (state.gold >= state.producers.cost) {
state.gold -= state.producers.cost;
state.producers.cost = state.producers.cost * state.producers.growthRate;
state.producers.count++;
}
}
}
}
}
};`
And here is the responce after submitting: