wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Yr9 - Java Script - Lesson 2

Total questions: 11

Worksheet time: 6mins

Name
Class
Date
1.

What are the 3 main languages of the Internet?

a)

HTML

b)

CSS

c)

Python

d)

Javascript

2.

What it HTML used for?

a)

Structure

b)

Presentation

c)

Behaviour

3.

What is CSS used for?

a)

Structure

b)

Behaviour

c)

Presentation

4.

What is Javascript used for?

a)

Behaviour

b)

Presentation

c)

Structure

5.

Between which tags do you insert Javascript?

a)

<script>

b)

<html>

c)

<title>

d)

<style>

6.

What would the following Javascript do?


<script>

{

alert("Hello Class");

}

</script>

a)

Write "Hello Class" on the screen

b)

Nothing

c)

Write 'alert hello class'

d)

Write "Hello Class" dialog box

7.

What are the values of the 2 variables:


<script>

{

var number1 = 13

var number2 = 15

}

</script>

a)

13 and 5

b)

13 and 15

c)

28

d)

28 and 13

8.

What does the following code do?


<script>

function run()

{

var number1 = 13

var number2 = 15

alert(number1 + number2);

}

</script>

a)

Put's an alert message on the screen saying, '-2'

b)

Adds an alert message saying 1315

c)

Writes 13 and 15 to the screen

d)

Put's an alert message on the screen saying, '28'

9.

What does the following code do?


<script>

{

var firstname = "Joe"

var surname = "Bloggs"

alert(firstname + " " + surname);

}

</script>

a)

Puts an alert on the screen saying 'Joe Bloggs'

b)

Nothing

c)

Writes 'J Bloggs' on the screen

d)

Writes 'Joe Bloggs' to the screen

10.

What is wrong with the following code?


<script>

function run()

{

var firstname = "Joe"

var surname = "Bloggs"

alert(onename + " " + surname);

}

</script>

a)

Nothing, the script will execute perfectly

b)

The wrong brackets have been used

c)

A variable has been incorrectly referenced

d)

It is missing a semi colon

11.

Which part of the HTML page do you add <Script> tags?

a)

<body>

b)

<foot>

c)

<head>

d)

<title>