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 output = "";
- var input = "javascript is awesome";
- for (text = 0; text < input.length; text++){
- if (input[text] == "a"){
- output += "4";
- } else if (input[text] == "e"){
- output += "3";
- } else if (input[text] == "i"){
- output += "1";
- } else if (input[text] == "o"){
- output += "0";
- } else{
- output += input[text]
- }
- }
- console.log(output);
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement