Function to validate number ( Check iffrequency of a digit is less than thedigit itself or not )
function validate ( n ) { for ( let i = 0 ; i < 10 ; i ++ ) { let temp = n ; let count = 0 ; while ( temp > 0 ) {