Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html><head><title> some weird title </title></head>
- <body>
- <p id="1"></p>
- <script>
- var strings=window.prompt("enter a string");
- for(var i=0; i<strings.length;i++){
- character = strings.charAt(i);
- if (!isNaN(character * 1)){
- alert('character is numric');
- }else{
- if (character == character.toUpperCase()) {
- alert ('upper case true');
- }
- if (character == character.toLowerCase()){
- alert ('lower case true');
- }
- }
- }
- </script>
- </body>
- </html>
- <html><head><title> some weird title </title></head>
- <body>
- <p id="1"></p>
- <script>
- var numOfTrue;
- var Answers = [ "true", "false", "false", "true", "false" ];
- var numOfTrue = 0;
- for(var i=0;i<Answers.length;i++){
- if(Answers[i] === "true")
- numOfTrue++;
- }
- document.write(numOfTrue);
- </script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment