"2for"
Bootstrap 4.1.1 Snippet by lavan

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <!DOCTYPE html> <html> <body> <button onclick="doit()">doit</button> <script> function doit(){ var text=""; for (var i=1;i<=10;i++){ text+="\n"; for (var j=1;j<=i;j++){ text+=1+" " } } console.log(text) } </script> </body> </html>

Related: See More


Questions / Comments: