SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
|
Email
Search
Test your basic knowledge |
Javascript Basics
Start Test
Study First
Subject
:
it-skills
Instructions:
Answer 50 questions in 15 minutes.
If you are not ready to take this test, you can
study here
.
Match each statement with the correct term.
Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.
This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. To get the current checked status of the control for radio buttons
string
document.getElementById("radioButtonId").checked;
udddd
document.write("Text Here") //Remains on current line
2. When you __________ a javascript variable it retains its original value
Math.random() //Returns a value >= 0.0 but <1.0
redeclare
document.getElementById("radioButtonId").value;
t
3. String object method used to return a new string that contains part of the original string from the specified start position and up to but not including the specified stop index
document.getElementById("ButtonId").onclick = functionName;
n
window.location = "New Web Address Here";
substring(startIndex, stopIndex)
4. To create a new Date object
getTime()
r
Src - e.g. <script src="fileName.js"> //
var dateObject = new Date(year, month, day, hours, minutes, seconds, milliseconds)
5. When you add a string and a number the result will be a ____
v
<noscript>
string
Math.min(var1, var2, varN)
6. To set the current checked status of the control for checkboxes
v
Math.min(var1, var2, varN)
document.getElementById("CheckboxId").checked = true; //Could also be false
isNaN(varHere) //Returns true or false.
7. Date object method used to return a string containing the date
var arrayVar = new Array()
document.getElementById("ButtonId").onclick = functionName;
<script type="text/javascript">.....</script>
toDateString()
8. A _______ variable can be changed and accessed from within and without a function or object.
global
<noscript>
n
prompt("Text Here")
9. To get the current value of the control for a text area
indexOf(searchValue, startPosition)
toUpperCase()
document.getElementById("textAreaId").value;
toExponential(digits)
10. The string escape sequence to insert a single quote in JavaScript
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
11. The available properties for the Number object: Number.MAX_VALUE - Number.MIN_VALUE - Number.POSITIVE_INFINITY - _______ - Number.NaN
var arrayVar = new Array()
var stringVar = "part 1:" + "part 2";
toTimeString()
Number.NEGATIVE_INFINITY
12. Math object method used to return a random number
Math.random() //Returns a value >= 0.0 but <1.0
confirm("Message Text Here")
redeclare
document.getElementById("checkboxId").value;
13. Math object method used to return the lowest value for a set of supplied numbers
document.getElementById("spanId").firstChild.nodeValue = "New Value";
Math.min(var1, var2, varN)
<noscript>
Use a parse. Example : var intVar = parseInt(prompt("Text Here"))
14. A statement that yields a value
document.getElementById("ButtonId").onclick = functionName;
expression
===
"
15. To make the browser load a new page using JavaScript
window.location = "New Web Address Here";
document.getElementById("radioButtonId").checked;
Math.min(var1, var2, varN)
expression
16. Unlike ________________ identity operators do not perform type coercion.
"
confirm("Message Text Here")
'
standard equality operators
17. The syntax of a conditional operator
Math.round(number)
Use the second parameter. Example: prompt("Enter Age:", "18")
event handler .
(Condition_Expression) ? Value_If_True : Value_If_False;
18. To create a function that returns a value in JavaScript
var functionName = function(param1, param2, paramN) {}
substring(startIndex)
getTime()
Use a parse. Example : var intVar = parseInt(prompt("Text Here"))
19. Date object method used to return a string containing the date and time
toString()
var answerVar = confirm("Message Text Here")
!==
<script type="text/javascript">.....</script>
20. To create an Array object in JavaScript
toFixed(digitCount)
window.location = "New Web Address Here";
getFullYear()
var arrayVar = new Array()
21. The escape sequence used to insert a Unicode character into a string in JavaScript
ondblclick
sensitive
udddd
setMilliseconds()
22. The available get methods for a Date object: getTime() - _________ - getMonth() - getDate() - getHours() - getMinutes() - getSeconds() - getMilliseconds()
getFullYear()
window.location()
standard equality operators
Underscores
23. To set focus on the control for textboxes
Number.NEGATIVE_INFINITY
if (condition) {}
document.getElementById("TextBoxId").focus;
<noscript>
24. JavaScript is case _______
sensitive
Two forward slashes "//"
'
toTimeString()
25. Math object method used to return the absolute value of a given number
Math.abs(number)
toTimeString()
Two forward slashes "//"
<script type="text/javascript">.....</script>
26. The string escape sequence to insert a vertical tab in JavaScript
var stringVar = prompt("Text Here")
<noscript>
v
document.getElementById(id)
27. Math object method used to return a given number rounded to the next highest integer value
Math.ceil(number)
!==
Math.round(number)
Math.pow(number, power)
28. Statements end in JavaScript with a ________
var stringVar = prompt("Text Here")
prompt("Text Here")
semicolon ";"
window.location()
29. Math object method used to return a given number raised to a given power
v
document.getElementById("radioButtonId").checked = true; //Could also be false
n
Math.pow(number, power)
30. A list-like construct that has properties which corresponds to JavaScript values or variables or other objects.
<script type="text/javascript">.....</script>
Objects
"
Use a parse. Example : var intVar = parseInt(prompt("Text Here"))
31. To set the current value of the control for a text area
document.getElementById("spanId").firstChild.nodeValue = "New Value";
document.getElementById("textAreaId").value = "Text Value";
toFixed(digits)
var functionName = function(param1, param2, paramN) {}
32. To access a page element by id
toString()
document.getElementById(id)
toUpperCase()
Number.NEGATIVE_INFINITY
33. String object method used to get the character at a specified index position
charAt(position)
document.write("Text Here") //Remains on current line
udddd
document.getElementById("checkboxId").value;
34. The identity operator for equals
Math.ceil(number)
Math.max(var1, var2, varN)
===
document.getElementById("TextBoxId").disabled = true;
35. The four attributes of the <script> tag:Type - Src - _____ and Defer
Math.ceil(number)
document.getElementById("checkboxId").value;
Charset
indexOf(searchValue, startPosition)
36. The ________ tag is used to display the text between the opening and closing tag if JavaScript is disabled or otherwise not available
<noscript>
'
Use a parse. Example : var intVar = parseInt(prompt("Text Here"))
Math.abs(number)
37. To code an If statement in JavaScript
Underscores
if (condition) {}
document.getElementById("TextBoxId").value;
getFullYear()
38. Command to display a prompt
document.getElementById("TextBoxId").value;
prompt("Text Here")
getTime()
var arrayVar = new Array()
39. To assign the value from a prompt to a string
r
var stringVar = prompt("Text Here")
Src - e.g. <script src="fileName.js"> //
isNaN(varHere) //Returns true or false.
40. What Date object method is used to return the number of milliseconds since the start of GMT
while (condition) {}
document.getElementById("radioButtonId").checked;
toLowerCase()
getTime()
41. String object method used to concatenate multiple strings
Charset
Multi line
concat(var1, var2, varN)
document.getElementById("spanId").firstChild.nodeValue = "New Value";
42. The string escape sequence to insert a tab in JavaScript
global
t
document.getElementById("radioButtonId").checked = true; //Could also be false
confirm("Message Text Here")
43. To get the value or the currently selected item for lists
Math.max(var1, var2, varN)
var dateObject = new Date("11/22/2012 18:25:35")
Math.random() //Returns a value >= 0.0 but <1.0
document.getElementById("listId").value;
44. To code a button.onclick event handler
Charset
var dateObject = new Date(year, month, day, hours, minutes, seconds, milliseconds)
document.getElementById("ButtonId").onclick = functionName;
document.getElementById("checkboxId").value;
45. The two methods common to most controls: ______ //Brings focus to the control blur //Removes focus from the control
var dateObject = new Date(year, month, day, hours, minutes, seconds, milliseconds)
document.getElementById("checkboxId").checked;
focus
document.getElementById("spanId").firstChild;
46. String object method used to return the position of the first instance of a specified search string starting from the specified index
indexOf(searchValue, startPosition)
document.getElementById("spanId").firstChild;
document.getElementById("ButtonId").onclick = functionName;
var dateVar = new Date()
47. To get the text value of the control for radio buttons
Math.abs(number)
Use the second parameter. Example: prompt("Enter Age:", "18")
if (condition) {}
document.getElementById("radioButtonId").value;
48. To denote a string in JavaScript
Either single or double quotes surrounding the data
if (condition) {}
Charset
sensitive
49. This returns only True or false values
confirm()
Math.max(var1, var2, varN)
(Condition_Expression) ? Value_If_True : Value_If_False;
document.getElementById("textAreaId").value = "Text Value";
50. To display a confirmation
Multi line
confirm("Message Text Here")
toTimeString()
Math.ceil(number)