diamond pattern js code example
Example: 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>