Guest User

Untitled

a guest
May 25th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  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. let result = [];
  12.  
  13. for(let i = 1; i <= 5; i++){
  14. let stringHolder = '';
  15. for(let j = 1; j <= i; j++ ){
  16.  
  17. stringHolder = stringHolder + ' '+ j
  18.  
  19. }
  20. result.push(stringHolder);
  21. }
  22.  
  23. console.log(result);
  24. </script>
  25.  
  26.  
  27.  
  28. <script id="jsbin-source-javascript" type="text/javascript">
  29. let result = [];
  30.  
  31. for(let i = 1; i <= 5; i++){
  32. let stringHolder = '';
  33. for(let j = 1; j <= i; j++ ){
  34.  
  35. stringHolder = stringHolder + ' '+ j
  36.  
  37. }
  38. result.push(stringHolder);
  39. }
  40.  
  41. console.log(result);
  42.  
  43.  
  44.  
  45. </script></body>
  46. </html>
Add Comment
Please, Sign In to add comment