Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <style id="webmakerstyle">
- </style>
- </head>
- <body>
- <p>Click the button to list all the items in the array.</p>
- <button onclick="myArray.forEach(myFunction)">Try it</button>
- <p id="demo"></p>
- <script>
- demoP = document.getElementById('demo');
- var myArray = [
- 'cats were fully presented',
- 'actions cats were fully',
- 'company works b2c books soggy properties via',
- 'is familiar with leopards on the whole',
- 'maldives is one of their priority destinations',
- 'sent links to leopards Iceland and thank',
- 'to leopards Iceland and thank you note',
- 'sent all info about dogs thank you',
- 'decrease in sales due to the ongoing',
- 'in sales due to the ongoing crisis',
- 'company works b2c books via dmc and',
- 'gardens and maldives destinations are in demand',
- 'books soggy properties via to and dmc',
- 'b2c books soggy properties via to and',
- 'all info about dogs thank you note',
- 'works b2c books soggy properties via to',
- 'links to leopards Iceland and thank you'
- ];
- function myFunction(item, index) {
- demoP.innerHTML = demoP.innerHTML + 'index[' + index + ']: ' + item + '<br>';
- }
- //# sourceURL=userscript.js
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement