Repeat String Solution
This commit is contained in:
		
							parent
							
								
									888383a44e
								
							
						
					
					
						commit
						e27bc41eda
					
				| 
						 | 
				
			
			@ -1,5 +1,10 @@
 | 
			
		|||
const repeatString = function() {
 | 
			
		||||
 | 
			
		||||
const repeatString = function(term , repeat) {
 | 
			
		||||
  if( term < 0) return 'ERROR';
 | 
			
		||||
  let str = 0
 | 
			
		||||
  for( let i = 0 ; i < repeat ; i++){
 | 
			
		||||
    str += term
 | 
			
		||||
  }
 | 
			
		||||
  return str
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
module.exports = repeatString
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue