JSFiddle - React, Tailwind, and code Playground

by iammaddison143

HTML

<input id="task-control" type="text" placeholder="A-Z,a-z,0-9" value="QwErTy123">
<button id="task-button">Go!</button>

JavaScript

var control = document.getElementById( 'task-control' ),
		button = document.getElementById( 'task-button' );


button.onclick = function() {
  var str = control.value;
  
  for ( i = 0 ; i < control.length; i++ ) {
/*     if ( str.charAt( i ) === str.charAt( i ).toUpperCase() ) {
      console.log( str.charAt( i ) );
    } */
    console.log( i )
  }
}