SHARE
TWEET

Untitled

a guest Mar 26th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function coding(input){
  2. let n =Number(input.shift());
  3.  
  4. let char = n.toString();
  5. let digit =0;
  6. let row =""
  7.  
  8. for(let index=0;index<char.length;index++){
  9.    
  10.            digit =Math.floor(n%10)
  11.              n/=10;
  12.              
  13.              let result = String.fromCharCode(digit+33)
  14.              if(digit==0){
  15.                 console.log("ZERO")
  16.                
  17.             }
  18.               for(let j=0;j<digit;j++){
  19.                
  20.                 row +=(`${result}`)
  21.                
  22.                
  23.               }  
  24.              
  25.               console.log(row)
  26.                 row =""
  27.     }
  28.    
  29.    
  30.  
  31.  
  32. }
  33.  
  34.  
  35.  
  36. coding([1234])
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top