Write a JavaScript program to print the following output using for loop.
1
22
333
4444
<html>
<head>
<title>Number Pattern</title>
</head>
<body>
<script>
for(var i=1; i<=4; i++)
{
for(var j=1; j<=i; j++)
{
document.write(i);
}
document.write("<BR>");
}
</script>
</body>
</html>
