Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Hacker Speak</title>
- </head>
- <body>
- <script type="text/javascript">
- var input = "Javascript is awesome";
- var output = "";// j4v4scr1pt 1s 4w3s0m3
- for (i = 0; i < input.length; i++){
- if (input[i] == "a"){
- output += "4";
- } else if (input[i] == "i"){
- output += "1";
- } else if (input[i] == "e"){
- output += "3";
- } else if (input[i] == "o"){
- output += "0";
- } else {
- output += input[i]
- };
- };
- console.log(output);
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement