Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width">
- <title>JS Bin</title>
- </head>
- <body>
- <script id="jsbin-javascript">
- let result = [];
- for(let i = 1; i <= 5; i++){
- let stringHolder = '';
- for(let j = 1; j <= i; j++ ){
- stringHolder = stringHolder + ' '+ j
- }
- result.push(stringHolder);
- }
- console.log(result);
- </script>
- <script id="jsbin-source-javascript" type="text/javascript">
- let result = [];
- for(let i = 1; i <= 5; i++){
- let stringHolder = '';
- for(let j = 1; j <= i; j++ ){
- stringHolder = stringHolder + ' '+ j
- }
- result.push(stringHolder);
- }
- console.log(result);
- </script></body>
- </html>
Add Comment
Please, Sign In to add comment