Sample code -Not all elements are focusing programmatically [closed]

https://codepen.io/Kharabela-Rout/pen/qBwabrO -Please refer the link.


I want to to check all form elements which are empty/not keyed in with any value.

On next button.I am calling a function validateAccountPage(), which iterates through all fields.

I am not sure what check is failing .focus works when I click each element individually and tab out.