To return value of a char . For example , 2 is returned for '2' . 10 is returned for ' A ' , 11 for ' B '
function val ( c ) { if ( c >= ' ' . charCodeAt ( ) && c <= ' ' . charCodeAt ( ) ) return ( c - ' ' . charCodeAt ( ) ) ; else return ( c - ' ' . charCodeAt ( ) + 10 ) ; }