I'm working through some code a previous developer has written and have came across the following notation:
'.js-enter-new-address click'() {}
The code works but I dont understand why. Can anyone point me to any documentation of how this works? as i've not come across js written in this form before. I would usually expect it to be:
$('.js-enter-new-address').on('click', function(event) {}
Update I've noticed this code is part of the following, Please see below:
const deliveryAddressComponent = Component.create('.checkout-delivery-address', {
'.js-enter-new-address click'() {},
});