Advertisement
pleabargain

Untitled

Feb 2nd, 2017
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.23 KB | None | 0 0
  1. <html>
  2. <head>
  3.  
  4. <style id="webmakerstyle">
  5.  
  6. </style>
  7. </head>
  8. <body>
  9. <p>Click the button to list all the items in the array.</p>
  10. <button onclick="myArray.forEach(myFunction)">Try it</button>
  11. <p id="demo"></p>
  12.  
  13.  
  14. <script>
  15. demoP = document.getElementById('demo');
  16. var myArray = [
  17.     'cats  were fully presented',
  18.     'actions cats  were fully',
  19.     'company works b2c books soggy properties via',
  20.     'is familiar with leopards on the whole',
  21.     'maldives is one of their priority destinations',
  22.     'sent links to leopards Iceland and thank',
  23.     'to leopards Iceland and thank you note',
  24.     'sent all info about dogs thank you',
  25.     'decrease in sales due to the ongoing',
  26.     'in sales due to the ongoing crisis',
  27.     'company works b2c books via dmc and',
  28.     'gardens and maldives destinations are in demand',
  29.     'books soggy properties via to and dmc',
  30.     'b2c books soggy properties via to and',
  31.     'all info about dogs thank you note',
  32.     'works b2c books soggy properties via to',
  33.     'links to leopards Iceland and thank you'
  34. ];
  35. function myFunction(item, index) {
  36.     demoP.innerHTML = demoP.innerHTML + 'index[' + index + ']: ' + item + '<br>';
  37. }
  38. //# sourceURL=userscript.js
  39. </script>
  40. </body>
  41. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement