Flag of Ukraine
SymfonyCasts stands united with the people of Ukraine
Next Chapter

Challenge #1 of 1


Q: 

What would you have to change to this controller to be able to get an array of all the matched targets instead of just one?

export default class extends Controller {
    static targets = ['item'];

    connect() {
        this.itemTarget.forEach((itemElement) => {
            // Do something with this target
        });
    }
}

userVoice