Assignment 10: Due 11/22

Post date: Nov 17, 2010 5:18:19 AM

Tasks:

1. Matching the following functions with javascript keywords: (ref: Java Script Summary )

  1.    Allow you to create an exception

  2.    Allow you to test a block

  3.    loop through the elements

  4.    general loop

  5.    break the loop and continue executing the code after the loop

  6.    break the current loop and continue with the next value

  7.    popup box which allows users to input a value

    a.   for

    b.   while

    c.   if

    d.   throw

    e.   for  ... in

    f.    try

    g.   continue

    h.   break

    i.    alert

    j.    prompt

    k.   confirm

2.    What's the output for the following JavaScript? 

<script>

var i=0

for (i=0;i<=4;i++)

{

if (i==3){break}

document.write("The number is " + i)

document.write("<br />")

}

</script>

Submit your answer to 360 Dropbox for Assignment 10.

Supportive videos:

    - Video: Javascript Tutorial - 1 - Introduction to Javascript

    - Video: Javascript Tutorial - 2 - Basic Syntax

    - Video: Javascript Tutorial - 3 - Variables

    - Video: Javascript Tutorial - 4 - More on Variables

    - Video: Javascript Tutorial - 5 - Prompt

    - Video: Javascript Tutorial - 6 - Arrays

    - Video: Javascript Tutorial - 7 - Changing and Adding Array Elements

(Follow the youtube link to 17)