Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • sorry i'm confused a bit, we have each as well as keyup and keydown properties, why is that? Commented Mar 20, 2020 at 5:05
  • .each simply iterates over items in an array and will not listen for when inputs have changes, using the combination of keyup and keydown to call the function will ensure that when users are typing or using the delete key the function will also get called and calculate whether the other inputs should be shown Commented Mar 20, 2020 at 20:47