squares and cubes in JavaScript

squares and cubes in JavaScript

15CSL77
WEB TECHNOLOGY LABORATORY WITH MINI PROJECT


Program

Write a JavaScript that calculates the squares and cubes of the numbers from 0 to 10
and outputs HTML text that displays the resulting values in an HTML table format.

Basic Steps:

step 1:- create a table with heading number, square, cube
step 2:- implement for loop with a variable starting from 0 to 10
step 3:- for square (variable*variable) & for cube(variable*variable*variable)

Code for squares and cubes in JavaScript



Output


squares and cubes in JavaScript video tutorial


1 comment:

  1. what about if we need 100 to thousand with the increment of 1+100

    ReplyDelete

For Query and doubts!

Powered by Blogger.