Font size
WorksheetsSummative Test Q3 M1-6
Total questions: 49
Worksheet time: 39mins
Using this after an HTML document is loaded will delete all existing HTML.
InnerHTML
document.write();
window.alert();
console.log();
It defines the HTML content.
InnerHTML
document.write();
window.alert();
console.log();
The _____ assignment operator can also be used to add (concatenate) strings.
+=
-=
*=
/=
It is used to print any kind of variables defined before in it or to just print any message that needs to be displayed to the user.
InnerHTML
document.write();
window.alert();
console.log();
True or False:
It was 1996 when JavaScript was invented
True
False
True or False:
JavaScript is the default language in HTML
True
False
It is appropriate to use (a) for testing purposes.
To make the script more readable, it is recommended to apply ___________.
Break
Black label
Line
White space
In programming language, program instructions are called ________.
Literals
Function
String
Statements
________________ is a combination of values, variables, and operators, which computes to a value.
expressions
Syntax
keywords
variables
What kind of special character or symbol separates JS Statements?
Angle Bracket
Asterisk
Bracket
Semicolon
These texts are written within double or single quote. What do you call this one?
Code
Numbers
Strings
Values
There are two types of JavaScript values, Fixed and Variable values.
Fixed values are called _________. Variable values are called Variables
Literals
Constant
Numbers
Strings
What type of redeclaring or assigning variables is this?
var x = 2; // Allowed
var x = 3; // Allowed
x = 4; // Allowed
Redeclaring a JavaScript var variable is allowed anywhere in a program
Redeclaring or reassigning an existing const variable, in the same scope, or in the same block, is not allowed
Redeclaring or reassigning an existing var or let variable to const, in the same scope, or in the same block, is not allowed
Redeclaring a variable with const, in another scope, or in another block, is allowed
It can use the document.getElementById(id) method to access an HTML element, and the id attribute defines the HTML element.
InnerHTML
document.write();
window.alert();
console.log();
True or False:
One of the uses of JavaScript is to link websites
True
False
These are set of rules use in making a webpage.
expression
Syntax
keywords
variables
Creating a variable in JavaScript is called "__________" a variable.
value
declaring
literals
strings
In the JavaScript statement below, which part will Not Allowed
var x = 2; // ---A
const x = 2; // ---B
{ let x = 2; // ---C
const x = 2; // ---D
A and B
B and C
C and D
B and D
_______ keyword is used to declare variables.
VAR
Var
var
VaR
What type of Camel Case is this?
GoodVIBES
Underscore
Lower Camel Case
Upper Camel Case
Mixed Camel Case
________ keyword used to define variable with restricted scope.
var
let
cons
fix
It is a keyword use to declare constant.
var
const
let
x, y, z
What type of Camel Case is this?
hAPPYTOGETHER
Underscore
Lower Camel Case
Upper Camel Case
Mixed Camel Case
It is used to identify actions to be performed. It tells the browser to create variables.
expression
Syntax
keywords
variables
___________________ are ignored and will not be executed by the web browsers.
Expressions
Syntax
Variables
JavaScript Comments
Which of the following stores data values?
expression
Syntax
keywords
variables
What type of operator is used in this example:
var a = 5;
var b = 2;
var c = a * b;
Addition
Subtraction
Multiplication
Division
____________ is used to assign values to variables.
bracket
plus sign
equal sign
semicolon
/*_____*/
Multi-line comments
var x, y, z
variables
{ }
block scope
It is a variable inside the function or block scope?
Local scope
Global scope
Function scope
Block scope
It declares variables inside a function and can be accessed only inside the function where they are declared
Local scope
Global scope
Function scope
Block scope
What type of scope is this?
{ var x = 10 ;
var x = 5 ;
var x = 8 ;}
Local-block scope
Global scope
Local-function scope
variable scope
It behaves like a let keyword
const
if
var
try
A declared variable without a value is called ____________.
fixed
undefined
literals
blank
What type of redeclaring or assigning variables is this?
var x = 2; // Allowed
const x = 2; // Not allowed
{ let x = 2; // Allowed
const x = 2; // Not allowed }
Redeclaring a JavaScript var variable is allowed anywhere in a program
Redeclaring or reassigning an existing const variable, in the same scope, or in the same block, is not allowed
Redeclaring or reassigning an existing var or let variable to const, in the same scope, or in the same block, is not allowed
Redeclaring a variable with const, in another scope, or in another block, is allowed
What type of operator is used in this example:
var a = 5
var b = 10
var c = a + b
Addition
Subtraction
Multiplication
Division
What type of Camel Case is this?
Sir_NAVARRO
Underscore
Lower Camel Case
Upper Camel Case
Mixed Camel Case
The __________ keyword is use it cannot be reassigned.
const
if
var
try
Redeclaring or reassigning an existing var or let variable to const, in the same scope, or in the same block, is __________.
Allowed
Not Allowed
Define
Initialized
Redeclaring a variable with const, in another scope, or in another block, is ______________.
Allowed
Not Allowed
Define
Initialized
These are symbols that are used to perform operations on operands.
JavaScript Const
JavaScript Let
JavaScript Arithmetic
JavaScript Operator
Solve the problem:
var x = (75 – 50)*2
x=____
25
50
-25
-50
What type of redeclaring or assigning variables is this?
const x = 2; // Allowed
{ const x = 3; // Allowed }
{ const x = 4; // Allowed }
Redeclaring a JavaScript var variable is allowed anywhere in a program
Redeclaring or reassigning an existing const variable, in the same scope, or in the same block, is not allowed
Redeclaring or reassigning an existing var or let variable to const, in the same scope, or in the same block, is not allowed
Redeclaring a variable with const, in another scope, or in another block, is allowed
It is a symbol for assignment operator.
+
-
/
=
If you add a number and a string, the result will be __________________.
Boolean
Number
String
Zero
These are used to perform arithmetic on numbers
Arithmetic operators
Operators
Assignment operators
Logical operators
When used on strings, the _______________ is called the concatenation operator
= operator
+ operator
* operator
None of the above
Which of the following JavaScript operators is the Modulus (Remainder)?
++
+-
/
%
