JAVASCRIPT TEST PAPER 2026/2027 QUESTIONS AND
SOLUTIONS RATED A+
✔✔global variable - ✔✔What type of variable is available throughout the entire script?
✔✔argument - ✔✔What is a value or expression containing data or code that is passed
on to a function?
✔✔pass by reference - ✔✔What describes when values are passed to a function, and
the function's parameters receive a copy of its argument's value?
Example:
function myFunction(x){
return x;
}
var num = 2;
myFunction(num);
✔✔pass by value - ✔✔What describes when values are passed to a function, and the
function's parameters receive its argument's actual value?
Example:
function myFunction(x){
return x;
}
myFunction(2);
✔✔isNaN() - ✔✔Which method determines whether an value is a number?
✔✔parseInt() - ✔✔Which method converts a string to its integer equivalent?
✔✔parseFloat() - ✔✔Which method converts a string to its floating-point decimal
equivalent?
✔✔Load-time errors - ✔✔Which errors are typically syntax errors and usually cause
error alerts?
✔✔Run-time errors - ✔✔Which errors occur after the script has loaded and is running,
typically caused by improper use of commands?
✔✔Logic errors - ✔✔Which errors are mathematical , casting errors, errors in proper
command usage or errors in the structure of the script, which result in the script running
improperly?
✔✔literal - ✔✔What is the actual data values you provide in JavaScript?
, ✔✔object - ✔✔What is a self-contained programming component that contains
properties and methods?
✔✔dot notation - ✔✔What is a reference technique used to access a property or
method of an object?
✔✔an object-based language
based upon an event-driven model
is platform-independent
enables quick development
is relatively easy to learn - ✔✔What are key characteristics and features of JavaScript?
✔✔client side - ✔✔Does JavaScript perform its functionality primarily on the client or
server-side?
✔✔embedded scripting - ✔✔Which technique adds JavaScript to a single web page
within either the <head> or <body>?
✔✔inline scripting - ✔✔Which technique adds JavaScript to a single HTML element?
✔✔external scripting - ✔✔Which technique adds JavaScript by linking web pages to a
text file with the .js file name extension?
✔✔<a href="#" onMouseOver="helloFunction();">Click Here</a> - ✔✔How do you apply
inline scripting to an element?
✔✔a letter,
the underscore ( _ ), or
the dollar sign ( $ ) - ✔✔What must variable names begin with?
✔✔unique - ✔✔Is these variables the same or unique?
var Result
var result
var RESULT
✔✔navigator - ✔✔Which object allows you to determine information about the user's
browser?
✔✔navigator.appName - ✔✔Which property returns a string value indicating the name
of the client browser?
SOLUTIONS RATED A+
✔✔global variable - ✔✔What type of variable is available throughout the entire script?
✔✔argument - ✔✔What is a value or expression containing data or code that is passed
on to a function?
✔✔pass by reference - ✔✔What describes when values are passed to a function, and
the function's parameters receive a copy of its argument's value?
Example:
function myFunction(x){
return x;
}
var num = 2;
myFunction(num);
✔✔pass by value - ✔✔What describes when values are passed to a function, and the
function's parameters receive its argument's actual value?
Example:
function myFunction(x){
return x;
}
myFunction(2);
✔✔isNaN() - ✔✔Which method determines whether an value is a number?
✔✔parseInt() - ✔✔Which method converts a string to its integer equivalent?
✔✔parseFloat() - ✔✔Which method converts a string to its floating-point decimal
equivalent?
✔✔Load-time errors - ✔✔Which errors are typically syntax errors and usually cause
error alerts?
✔✔Run-time errors - ✔✔Which errors occur after the script has loaded and is running,
typically caused by improper use of commands?
✔✔Logic errors - ✔✔Which errors are mathematical , casting errors, errors in proper
command usage or errors in the structure of the script, which result in the script running
improperly?
✔✔literal - ✔✔What is the actual data values you provide in JavaScript?
, ✔✔object - ✔✔What is a self-contained programming component that contains
properties and methods?
✔✔dot notation - ✔✔What is a reference technique used to access a property or
method of an object?
✔✔an object-based language
based upon an event-driven model
is platform-independent
enables quick development
is relatively easy to learn - ✔✔What are key characteristics and features of JavaScript?
✔✔client side - ✔✔Does JavaScript perform its functionality primarily on the client or
server-side?
✔✔embedded scripting - ✔✔Which technique adds JavaScript to a single web page
within either the <head> or <body>?
✔✔inline scripting - ✔✔Which technique adds JavaScript to a single HTML element?
✔✔external scripting - ✔✔Which technique adds JavaScript by linking web pages to a
text file with the .js file name extension?
✔✔<a href="#" onMouseOver="helloFunction();">Click Here</a> - ✔✔How do you apply
inline scripting to an element?
✔✔a letter,
the underscore ( _ ), or
the dollar sign ( $ ) - ✔✔What must variable names begin with?
✔✔unique - ✔✔Is these variables the same or unique?
var Result
var result
var RESULT
✔✔navigator - ✔✔Which object allows you to determine information about the user's
browser?
✔✔navigator.appName - ✔✔Which property returns a string value indicating the name
of the client browser?