Font size
WorksheetsJavaScript
Total questions: 15
Worksheet time: 8mins
Which of the following are valid keywords for JavaScript?
let
var
const
def
A callback is a function that is passed as an argument to another function.
True
False
Which symbol is used as an abbreviation for the jQuery function?
%
&
$
@
JavaScript is a simpler form of Java built for the web.
True
False
The Document Object Model (DOM) can be used to:
Find elements by class
Create new elements
Retrieve data from a server
Change element styles
The code in a function can access variables declared outside of the function.
True
False
Variables declared inside of a function are accessible outside of the function?
True
False
The syntax for JavaScript objects is similar to the syntax for Python dictionaries?
True
False
What is the name of the JavaScript standard?
JavaScript
ECMA Script
JS
PEP
The ++ operator increments the value of the operand by one.
True
False
Which operator can be used with both strings and numbers?
-
+
/
*
What will be logged to the console here?
console.log(5 + 7 + "hello" +5 + 12);
57hello512
12hello17
12hello512
57hello17
In the following code snippet, what is the value of "thing"?
var thing;
null
"thing"
undefined
""
What native JavaScript API would you use to get data from a remote server?
fetch
ajax
get
URL
Which of the following document methods can be used to select an element by its classes?
getElementById()
querySelector()
getElementsByClassName()
getElementsByTagName()
