Created
          April 23, 2016 05:57 
        
      - 
      
 - 
        
Save interdigitize/73516037b35587b72989c61af6840293 to your computer and use it in GitHub Desktop.  
    A while loop that continues to prompt until an input is entered that is greater than 0 or until the cancel button is clicked. 
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | var input; | |
| while(true){ | |
| input = prompt('Enter an integer greater than 0'); | |
| if (input > 0){ | |
| break; | |
| } else if (input === null) { | |
| break; | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment