Sharp Tutorial
java script pattern program

Python

Java

C

C++

HTML/CSS

Java Script

PHP

SQL

C Programs

Java Script

  • java script home
  • introduction
  • Variable Declare & Make Comment
  • operator
  • if else
  • loop
  • Array
  • Function
  • Java Script Objects
  • Java Script DOM

JS based examples

  • two number sum and diff programs
  • Pattern program in java script
  • zumble word quiz
  • Random number guess program
  • calculator in java script
  • digital clock in java script

HTML

  • HTML Home
  • Introduction
  • Commonly used tags
  • Formatting
  • Working with class
  • Apply Css
  • Layout
  • Link / Image
  • Html Forms
  • Html Tables
  • Responsive Design

CSS

  • Introduction
  • Types of Css
  • Background and Color
  • Css Formatting
  • Css Layout
  • Css Animation
  • Css Table
  • Css Effects
  • Css Pagination
  • Css Media Query

Pattern making program in java script

These programs are used to practise nested loops.

1
1 2
1 2 3
1 2 3 4

<html>
<title>JS introduction</title>
<head>
<script>
for(i=1;i<=4;i++)
{
for(j=1;j<=i;j++){
document.write(j);}
document.write("<br>");
}
</script>
</head>
<body>
</body>
</html>
[codepen_embed height="265" theme_id="default" slug_hash="KKwgxqx" default_tab="html,result" user="rajputadesh"]See the Pen KKwgxqx by rajput adesh (@rajputadesh) on CodePen.[/codepen_embed]

4 3 2 1
4 3 2
4 3
4

<html>
<title>JS pattern programs</title>
<head>
<script>
for(i=1;i<=4;i++)

{

for(j=4;j>=i;j–)

{

document.write(j);}

document.write(“<br>“);

}

</script>
</head>
<body>
</body>
</html>

[codepen_embed height="265" theme_id="default" slug_hash="NWPRLvY" default_tab="html,result" user="rajputadesh"]See the Pen NWPRLvY by rajput adesh (@rajputadesh) on CodePen.[/codepen_embed]

         *
      * *
   * * *
* * * *

<html>
<title>JS introduction</title>
<head>
<script>
for(i=1;i<=4;i++)

{

for(k=4;k>i;k–)

{

document.write(“&nbsp;&nbsp;”);

}

for(j=1;j<=i;j++){

document.write(j);

}

document.write(“<br>“);

}

</script>
</head>
<body>
</body>
</html>
[codepen_embed height="265" theme_id="default" slug_hash="JjoRaro" default_tab="js,result" user="rajputadesh"]See the Pen JjoRaro by rajput adesh (@rajputadesh) on CodePen.[/codepen_embed]

Enquiry about Course

Ask your Question

Click Here

Sharp (2) Tutorials

Video/ C Introduction

Watch video in full size

Video tutorial

Follow by Email
Facebook
Facebook
fb-share-icon
YouTube
Copyright © Sharp Tutorial
Build with WordPress
Wordpress Social Share Plugin powered by Ultimatelysocial
Sharp Tutorial