Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 125 - 2625 PortGPt V2.1
P. 125

    5.   What is looping?
                         6.   Write the syntax to the for loop.

                         7.   Name 2 event handlers.
                         8.   What is a function?
                     D.   Long answer type questions.

                         1.    Draw the flowchart for nested if statement.

                         2.   Write a JavaScript program to convert centimeters to inches. (Hint: 1 inch = 2.54 cms)
                         3.   Write the syntax of the while loop and give an example.

                         4.   Distinguish between continue and break statements.
                         5.   What is event handling?

                         6.   What is the difference between while and do-while statements?
                         7.   How does Event handling take place in JavaScript?

                     E.   Write a JavaScript program to calculate the area of a circle.

                     F.   Write a Program in JavaScript to determine whether a given number is prime or not.

                     G.    Factorial of a number means that the given number is multiplied by all the numbers preceding
                         up to that number. For eg,

                         5! = 5 x 4 x 3 x 2 x 1 = 120

                         Write a program in JavaScript to determine the factorial of a given number.

                                                                                                         Test Sheet 2  123

| 120 121 122 123 124 125 126 127 128 129 130 |