Jquery loop all inputs

Advantages: Straight-forward, no dependency on jQuery, easy to understand, no issues with preserving the meaning of this within the body of the loop, no unnecessary overhead of function calls (e. iterate over array if input element with same name, different index, same suffix. Here's a better . I can do every. So I'd like to set all selects inputs that don't already have option 2 selected to be selected and have a value of 2-updated
jQuery set all select inputs to certain value
Next, we will use the each () method to iterate over the inputs to display the .