Extract const variable for readability
This commit is contained in:
		
							parent
							
								
									a539c1776a
								
							
						
					
					
						commit
						b4909d27a3
					
				| 
						 | 
					@ -17,9 +17,8 @@ const shift = (char, shiftValue) => {
 | 
				
			||||||
  const code = char.charCodeAt();
 | 
					  const code = char.charCodeAt();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if ((code >= 65 && code <= 90) || (code >= 97 && code <= 122)) {
 | 
					  if ((code >= 65 && code <= 90) || (code >= 97 && code <= 122)) {
 | 
				
			||||||
    return String.fromCharCode(
 | 
					    const shiftedCode = mod(code + shiftValue - codeSet(code), 26) + codeSet(code);
 | 
				
			||||||
      mod(code + shiftValue - codeSet(code), 26) + codeSet(code)
 | 
					    return String.fromCharCode(shiftedCode);
 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  return char;
 | 
					  return char;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue