title: How to display 4 digits in the password field
body: <p>I'm using normal JS and JSP which contains normal HTML tags. I have an input field with the type as PASSWORD which contains the maxlength of 10 digits.</p>
  
  <p>Now I want to display the last 4 digits of the field values and other digits should be masked.</p>
  
  <p>I'm not using jQuery and I want to use in normal JS.</p>
  
  <p>So can anyone please suggest me any approach on it to achieve.</p>