I am following a javascript course and they did something like this:
function removeTransition(e) {
if (e.propertyName !== 'transform') return
// code here
}
However, to me, I think it would be better this way:
function removeTransition(e) {
if (e.propertyName === 'transform') {
// code here
}
}
Is there a reason to prefer one way over the other or it is just a style decision?