-1

I am new to JS, that is to say I've had about 2 and a half days of experience.

There is a piece of code I don't quite understand and would appreciate a clarification.

confirmPassword.oninput = () => checkPassword(confirmPassword.value);

I can make sense of what is happening here, kind of, but not entirely.

The = () => confuses me a bit.

  • [Arrow function expressions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions) – Phil Apr 07 '22 at 23:23

1 Answers1

1

It's doing this:

confirmPassword.oninput = function() {
    checkPassword(confirmPassword.value);
}
John Doherty
  • 3,669
  • 36
  • 38