Font size
WorksheetsJavascript
Total questions: 71
Worksheet time: 39mins
Which of these is a loop?
if(x<10)
while(x<10)
var x=10;
text(x,10;10)
Which command provides a random color?
Randomizer.color
Randomizer.nextColor()
RandColor;
nextColor.Randomizer()
Which of these will increase the value of the variable X?
increment (x)
x++;
x=x;
x+1;
Which of the following will decrease the value of x?
x--;
x-1;
x=x;
x=-x;
Greater than or equal to
> or =
> || =
>=
<=
His name is Fred and he is less than 16 years old
if (name = "fred" && age < 16 )
if (name === "fred" && age < 16 )
if (name = "fred" || age < 16 )
if (name === "fred" || age < 16 )
Repeat something 10 times
repeat 10
for (var i=0; i<10; i++)
repeat { } until 10;
while (i = 10)
When we are done with a line what do we put at the end?
a colon :
a semi-colon ;
a period .
a quotation mark "
When we surround a word with quotes "David" it's called ?
a program
a loop
a string
a command
A short form writing the word variable is
rav
VAR
var
varia
The "stroke" command means
color inside shape
color outside shape
color of blocks
border
What does the "fill" command do
put letters in the shape
put pictures in the shape
put color in the shape
put code in the shape
draw = function(){
......
}
x++;
This saves a value, which can be then assigned when writing code
Parameter
Function
Variable
Javascript is _________ language.
Programming
Scripting
Application
applet
JavaScript is ______ Side Scripting Language.
JSP
Servlet
Server
Browser
JavaScript is designed for following purpose -
To Style HTML Pages
To Perform Server Side Scripting Opertion
To add interactivity to HTML Pages.
To Execute Query Related to DB on Server
JavaScript is can be written -
directly into JS file and included into HTML
directly into HTML pages
directly on the Server Script
None of these
JavaScript is an ________ language.
compiled
interpreted
JavaScript Code is written inside file having extension __________.
.jsc
.jvs
.js
.javascript
Why JavaScript is called as Lightweight Programming Language ?
because JS can provide programming functionality inside but up to certain extend.
because JS is client side scripting
because JS is available free of cost.
because we can add programming functionality inside JS
Local Browser used for validations on the Web Pages uses __________.
HTML
CSS
js
java
JavaScript Code can be called by using _________.
RMI
Function / Method
Triggering Event
Preprocessor
Is this correct syntax to include JS Code inside HTML Page ?
<script type="text/javascript">
...
</script>
Yes
No
We cannot Place JS Code in the body tag . Say true/false.
True
False.
It can be an assignment operation, a function call, or a control structure
Comments
Case Sensitivity
Data Types
Statements
These are used to put information that can be useful later, and in JavaScript these are ignored by the browser.
Comments
Case Sensitivity
Data Types
Statements
These are used to put information that can be useful later, and in JavaScript these are ignored by the browser.
Comments
Case Sensitivity
Data Types
Statements
Names that refer to commands, functions, variables and keyword should be written correctly, variable “A” and “a” are two different variables.
Comments
Case Sensitivity
Data Types
Statements
It can be Numeric, String, Boolean or Null.
Comments
Case Sensitivity
Data Types
Statements
A type of network that is limited to a school or a similar location.
LAN
MAN
WAN
CAN
Who is the first computer programmer?
Bill Gates
Mark Zuckerberg
Lady Ada Agusta
Charles Babbage
Inside which HTML element do we put the JavaScript?
<js>
<script>
<scripting>
<javascript>
The external JavaScript file must contain the <script> tag
true
false
A programming language used for webpage functionality such as interactivity, data processing, animation, and development of purpose built apps such as mobile and desktop apps and more.
HTML5
CSS
JS
C#
The simplest data-storing structure in any programming language
Lists
Array
Queue
List
These are any variable names listed within a function's argument definition.
example: myFunction(x, y)
Parameter
Literals
Constraints
Variables
Which of the following is NOT a valid starting character for JS variable names?
Uppercase Letter
Lowercase Letter
Dollar Sign
Underscore
This allows JS Scripts and applications to perform different actions based on given conditions.
Variables
Loops
Conditional Statement
Stacks
Which of the following is NOT a valid component of a function declaration?
Function keyword
Function name
Pair of Square Braces
Pair of Curly Braces
Which of the following is a symbol that must NOT be present in any JS Variable?
A
z
_
%
Method used to select the element with a given identifier represented by the HTML element property ID
getElementByClassName() method
getElementById() method
getId()
getElementByTagName()
Which of the following operator is used for the Assignment Operator?
==
!
=
+
What is the symbol pair used to write a new line within a string values?
\*
\'
\n
\br
Using object constructors what specific keyword is used to create new object?
if
var
new
this
Which funtion is used when a JS application must ensure that the user gets the information that is displayed?
Alert box
Prompt Box
Combo Box
Confirm Box
Which of the following is NOT a valid keyword for JS
new
switch
synchronize
void
file extension for external JS files
.javascript
.js
.jscript
.script
built in object in JS that allows a script to perform mathematical task
Arithmetic
Math Object
Operation Object
Mathematics Object
used to write comments
++
=
//
--
Since JS functions allow reusability of code, how many times do written codes need too be DEFINED?
TWICE
THRICE
AS MANY AS POSSIBLE
ONCE
