NEW
Font size
WorksheetsJava Script
Total questions: 39
Worksheet time: 23mins
What is the data type used for the following variable var answer1 = "It's alright";
String
Boolean
Integers
An "ID" can be a word or a number.
True
False
Choose the codes that allow you to write into a <p> or a <h1>.
document.getElementById
document.write
alert
What is the "++" operator called ?
Incrementing
Decrementing
Two Additions
var x = 4
document.write(x **2)
What would be the value of x?
8
16
15
var x = 5;
var y = 2;
var z = x % y;
What would be the value of "z" in the above code?
1
2
0
Which of the following is correct about features of JavaScript?
It can not Handling dates and time.
JavaScript is a object-based scripting language.
JavaScript is not interpreter based scripting language.
All of the above
Which of the following is not JavaScript Data Types?
Undefined
Number
Boolean
Float
Choose the correct JavaScript syntax to change the content of the following HTML code.
document.getElement (“WadJava").innerHTML = "I am a WadJava";
document.getElementById (“WadJava").innerHTML = "I am a WadJava";
document.getId (“WadJava") = "I am a WadJava";
document.getElementById (“WadJava").innerHTML = I am a WadJava;
Which symbol is used for comments in Javascript?
\\
//
\* *\
\* */
Javascript string using double quotes is exactly the same as a string using single quotes?
True
False
Find output of below code
var a = '20';
var b = a = 30;
document.write(a+b);
Error in Script
'20'30
2030
50
What is divide by 0 in Javascript? var a = 10;
var b = 0;
document.write(a/b);
Nothing is printed
0 is printed
Infinity is printed
Some Garbage Value
y = 3;
x = 5 * y;
JavaScript was designed to add _____________________ to HTML pages
pages
files
interactivity
1. JavaScript is the most popular __________________language on the internet
high level
scripting
java
_________________is a small piece of data sent from a website and stored on the user's computer by the user's web browser while the user is browsing
cookies
data website
browser
A JavaScript is usually ___________________directly into HTML pages
connected
embedded
finalised
JavaScript is an ____________________language
compiled
sourced
interpreted
Java Script is ___________ sensitive language
case
insensitive
useless
