Guest User

Untitled

a guest
Apr 21st, 2019
73
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width">
  6. <title>JS Bin</title>
  7. </head>
  8. <body>
  9.  
  10. <script id="jsbin-javascript">
  11. <html>
  12. <body>
  13.  
  14. <script>
  15. //question 1
  16. /*propertyValueAt();
  17. function propertyValueAt(){
  18.  
  19. var i =0;
  20. var propertyName = prompt("please enter the property name \n");
  21. var a = prompt("please enter the value for a \n");
  22. var b = prompt("please enter the value for b \n");
  23. var c = prompt("please enter the value for c \n");
  24. var d = prompt("please enter the value for d \n");
  25. var q = prompt("please enter the value for q \n");
  26. var info=[a,b,c,d,q]
  27. if(a==null){
  28. document.write("I am sorry property name has come back undefined \n");
  29. }
  30. if(a==null){
  31. document.write("I am sorry a has come back undefined \n");
  32. }
  33. if(b==null){
  34. document.write("I am sorry a has come back undefined \n");
  35. return 0;
  36. }
  37. if(c==null){
  38. document.write("I am sorry b has come back undefined \n");
  39. return 0;
  40. }
  41. if(d==null){
  42. document.write("I am sorry d has come back undefined \n");
  43. return 0;
  44. }
  45. if(q==null){
  46. document.write("I am sorry q has come back undefined \n");
  47. return 0;
  48. }
  49. else{
  50. for(i=0;i<5;i++){
  51. document.write(info[i]);
  52. document.write("\n");}
  53. return 1;
  54. }
  55. }*/
  56. //question 2
  57. /*sumNested();
  58. function sumNested(){
  59. var total=0;
  60. var array=[];
  61. var size = prompt("please enter tell me how many numbers we are adding");
  62. for(i=0;i<size;i++){
  63. array[i]=parseInt(prompt("please enter the number to be put in the array space "));
  64. var total= total+ array[i];}
  65. document.write(total);
  66. }*/
  67. wordCount();
  68.  
  69. wordCount(){
  70.  
  71. }
  72. <\/script>
  73. </body>
  74. </html>
  75. </script>
  76.  
  77.  
  78.  
  79. <script id="jsbin-source-javascript" type="text/javascript"><html>
  80. <body>
  81.  
  82. <script>
  83. //question 1
  84. /*propertyValueAt();
  85. function propertyValueAt(){
  86.  
  87. var i =0;
  88. var propertyName = prompt("please enter the property name \n");
  89. var a = prompt("please enter the value for a \n");
  90. var b = prompt("please enter the value for b \n");
  91. var c = prompt("please enter the value for c \n");
  92. var d = prompt("please enter the value for d \n");
  93. var q = prompt("please enter the value for q \n");
  94. var info=[a,b,c,d,q]
  95. if(a==null){
  96. document.write("I am sorry property name has come back undefined \n");
  97. }
  98. if(a==null){
  99. document.write("I am sorry a has come back undefined \n");
  100. }
  101. if(b==null){
  102. document.write("I am sorry a has come back undefined \n");
  103. return 0;
  104. }
  105. if(c==null){
  106. document.write("I am sorry b has come back undefined \n");
  107. return 0;
  108. }
  109. if(d==null){
  110. document.write("I am sorry d has come back undefined \n");
  111. return 0;
  112. }
  113. if(q==null){
  114. document.write("I am sorry q has come back undefined \n");
  115. return 0;
  116. }
  117. else{
  118. for(i=0;i<5;i++){
  119. document.write(info[i]);
  120. document.write("\n");}
  121. return 1;
  122. }
  123. }*/
  124. //question 2
  125. /*sumNested();
  126. function sumNested(){
  127. var total=0;
  128. var array=[];
  129. var size = prompt("please enter tell me how many numbers we are adding");
  130. for(i=0;i<size;i++){
  131. array[i]=parseInt(prompt("please enter the number to be put in the array space "));
  132. var total= total+ array[i];}
  133. document.write(total);
  134. }*/
  135. wordCount();
  136.  
  137. wordCount(){
  138.  
  139. }
  140. <\/script>
  141. </body>
  142. </html></script></body>
  143. </html>
RAW Paste Data