Font size
WorksheetsYr9 - Java Script - Lesson 2
Total questions: 11
Worksheet time: 6mins
What are the 3 main languages of the Internet?
HTML
CSS
Python
Javascript
What it HTML used for?
Structure
Presentation
Behaviour
What is CSS used for?
Structure
Behaviour
Presentation
What is Javascript used for?
Behaviour
Presentation
Structure
Between which tags do you insert Javascript?
<script>
<html>
<title>
<style>
What would the following Javascript do?
<script>
{
alert("Hello Class");
}
</script>
Write "Hello Class" on the screen
Nothing
Write 'alert hello class'
Write "Hello Class" dialog box
What are the values of the 2 variables:
<script>
{
var number1 = 13
var number2 = 15
}
</script>
13 and 5
13 and 15
28
28 and 13
What does the following code do?
<script>
function run()
{
var number1 = 13
var number2 = 15
alert(number1 + number2);
}
</script>
Put's an alert message on the screen saying, '-2'
Adds an alert message saying 1315
Writes 13 and 15 to the screen
Put's an alert message on the screen saying, '28'
What does the following code do?
<script>
{
var firstname = "Joe"
var surname = "Bloggs"
alert(firstname + " " + surname);
}
</script>
Puts an alert on the screen saying 'Joe Bloggs'
Nothing
Writes 'J Bloggs' on the screen
Writes 'Joe Bloggs' to the screen
What is wrong with the following code?
<script>
function run()
{
var firstname = "Joe"
var surname = "Bloggs"
alert(onename + " " + surname);
}
</script>
Nothing, the script will execute perfectly
The wrong brackets have been used
A variable has been incorrectly referenced
It is missing a semi colon
Which part of the HTML page do you add <Script> tags?
<body>
<foot>
<head>
<title>
