Print alphabet pattern JavaScript JS program with flowchart and form values entered by user
In this tutorial, we will learn the followings;
- Flowchart of program of print alphabet pattern.
- Print alphabet pattern program.
- Print alphabet pattern program with form values entered by user.
Flowchart of program of print alphabet pattern.
Print alphabet pattern program.
<!DOCTYPE html> <html> <head> </head> <body> <script> var alpha = "a"; for(var i=0; i<10; i++) { for (var j=0; j<=i; j++) { document.write(alpha); } document.write("<br>"); } </script> </body> </html>
Print alphabet pattern program with form values entered by user.
<!DOCTYPE html> <html> <head> </head> <body> <script> var alpha = prompt("enter a number"); for(var i=0; i<10; i++) { for (var j=0; j<=i; j++) { document.write(alpha); } document.write("<br>"); } </script> </body> </html>