Skip to content

Commit

Permalink
Day 31: Alphabet and non Alphabet
Browse files Browse the repository at this point in the history
  • Loading branch information
uttu-316 committed Nov 11, 2022
1 parent bcaa2c6 commit 990e0e1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions javascript/Day31/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,14 @@ arrow_function("Ahemad");
xyz("utkarsh");

"A".charCodeAt();

const char = "a";

const code = char.toLowerCase().charCodeAt();

//check for alphabets
if (code >= 97 && code <= 122) {
console.log("Alphabet");
} else {
console.log("Non Alphabet");
}

0 comments on commit 990e0e1

Please sign in to comment.