Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Stickpillow93 authored Mar 29, 2022
1 parent 1201d71 commit 9158c7a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ let dict2 = {
k: "y",
" ": " ",
};

function chars(string) {
return Array.from(String(string));
}
Expand All @@ -68,7 +69,7 @@ function encrypt() {
alert("enter some text");
}
let output_string = "";
bruh = chars(x.value);
bruh = chars(x.value.toLowerCase());
for (let i = 0, size = bruh.length; i < size; i++) {
if (dict[bruh[i]] != undefined) {
bruh[i] = dict[bruh[i]];
Expand All @@ -85,7 +86,7 @@ function encrypt() {

function decrypt() {
let output_string = "";
bruh = chars(x.value);
bruh = chars(x.value.toLowerCase());
for (let i = 0, size = bruh.length; i < size; i++) {
if (dict2[bruh[i]] != undefined) {
bruh[i] = dict2[bruh[i]];
Expand Down

0 comments on commit 9158c7a

Please sign in to comment.