Answers for "printing star pattern in javascript"

1

how to print diamond pattern in javascript

<script type="text/javascript">


    for(var i=1;i<=5;i++)
        {
            for(var j=1;j<=i;j++)
                {
                    console.log("*");
                    
                }
            console.log("\n");
        }



</script>
Posted by: Guest on September-03-2020

Code answers related to "printing star pattern in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language