File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -42,13 +42,13 @@ class A1Z26CipherDecode extends Operation {
42
42
*/
43
43
run ( input , args ) {
44
44
const delim = Utils . charRep ( args [ 0 ] || "Space" ) ;
45
-
45
+
46
46
if ( input . length === 0 ) {
47
47
return [ ] ;
48
48
}
49
49
50
- let bites = input . split ( delim ) ,
51
- latin1 = "" ;
50
+ const bites = input . split ( delim ) ;
51
+ let latin1 = "" ;
52
52
for ( let i = 0 ; i < bites . length ; i ++ ) {
53
53
if ( bites [ i ] < 1 || bites [ i ] > 26 ) {
54
54
throw new OperationError ( "Error: all numbers must be between 1 and 26." ) ;
Original file line number Diff line number Diff line change @@ -42,12 +42,12 @@ class A1Z26CipherEncode extends Operation {
42
42
run ( input , args ) {
43
43
const delim = Utils . charRep ( args [ 0 ] || "Space" ) ;
44
44
let output = "" ;
45
-
45
+
46
46
const sanitizedinput = input . toLowerCase ( ) ,
47
47
charcode = Utils . strToCharcode ( sanitizedinput ) ;
48
48
49
49
for ( let i = 0 ; i < charcode . length ; i ++ ) {
50
- let ordinal = charcode [ i ] - 96 ;
50
+ const ordinal = charcode [ i ] - 96 ;
51
51
52
52
if ( ordinal > 0 && ordinal <= 26 ) {
53
53
output += ordinal . toString ( 10 ) + delim ;
You can’t perform that action at this time.
0 commit comments