

JavaScript and jQuery basics
Presentation
•
Computers, Professional Development, Education
•
1st Grade - Professional Development
•
Practice Problem
•
Hard
Kaamil Jasani
Used 24+ times
FREE Resource
4 Slides • 20 Questions
1
JavaScript and jQuery basics

2
Multiple Select
Which of the following declare and assign a variable correctly in JavaScript? (Choose 2)
var x = 5;
value = var 10;
variable = "Hello World";
let name = "John";
3
Multiple Select
By accessing the DOM, which of the following can JavaScript do? (Choose 3)
Change all the elements on the page
Add or remove HTML elements and attributes
Read or write files on the user's system
Permanently modify the website's files
Change all the CSS on the page
4
Multiple Choice
Which of the following will create an object?
{ }
[ ]
< >
( )
5
Multiple Choice
Which of the following will create an array?
{ }
[ ]
< >
( )
6
Multiple Choice
Which of the following invokes a function?
{ }
[ ]
< >
( )
7
Multiple Choice
In JavaScript, all variables must be identified with unique names.
True
False
8
Variables in JavaScript
The "identifier" or name of a variable in JavaScript will uniquely identify it
This means that when you create a variable, you need to make sure the name is unique in the current scope or you may end up overwriting the original variable
9
Multiple Select
Which of the following will create a function in JavaScript? (Choose 3)
function(parameters) { ... }
function name(parameters) { ... }
name(parameters) { ... }
function { (parameters) ... }
(parameters) => { ... }
10
Multiple Choice
What does DOM stand for?
Document Ordered Model
Data Object Model
Document Object Matter
Document Object Model
11
Multiple Choice
What is the file type of external JavaScript files?
.java
.js
.script
.jsp
12
Multiple Select
Which of the following values are "truthy"?
"false"
0
null
{} (empty object)
13
Converting values to booleans
Values in JavaScript are either "truthy" or "falsy"
This just means that when converted into a boolean, they will be coverted to true or false, respectively.
Some "truthy" values are: Any object, any function, numbers that are not 0, any non-empty string
Some "falsy" values are: null, undefined, 0, "" (the empty string)
This can, in some cases, be used to check if a value was set correctly or if a variable exists
14
Multiple Select
Which of the following rules must variable names (identifiers) obey? (Choose 2)
Identifiers must not contain numbers
Identifiers must not start with a number
Identifiers can only contain letters, digits, _ and $
Identifiers must start with a letter
15
Multiple Choice
What is the name of the variable in the following JavaScript code?
function greet() {
let name = "John";
console.log("Hello " + name);
}
greet
John
name
log
16
Multiple Choice
What does AJAX stand for?
Asynchronous JavaScript and XML
Asynchronous JSON and XML
Automated JavaScript and XML
Automated JSON and XML
17
Multiple Choice
What does JSON stand for?
JavaScript Ordered Notation
JavaScript Object Notation
JavaScript Object Network
JavaScript Ordered Network
18
Multiple Select
jQuery can select elements based on which of the following? (Choose 4)
Classes
Attributes
Type
Location
Relationship
19
Multiple Select
Which of these are advantages of using jQuery? (Choose 3)
Consistent and cross-browser way of working with the DOM
Simplified code for accessing the DOM
Faster performance when modifying the DOM
Quicker loading times
Using plugins to extend website functionality
20
Multiple Choice
Which of the following is a shortcut to access jQuery?
_
$
jQ
&
21
Multiple Choice
When using jQuery's methods which modify elements, you can only select one element at a time
True
False
22
Multiple Choice
What will the selector ":even" select in jQuery?
Every element of type "even"
Every element in an even position within its parent
Every element that contains an even number
Every other element
23
Special selectors in jQuery
:even will select any elements that are in an even position within their parent (useful for tables)
:parent will select any element that is a parent (i.e. has some element within it)
:hidden will select any element that is hidden (usually with jQuery's hide method)
:focus will select the element that currently has focus (usually useful for input elements, buttons and links)
There are many more, you can find them in jQuery's documentation
24
Multiple Choice
What does the following jQuery code do?
$(function() {
...
}
Runs the given function when the user tries to leave the page
Runs the given function immediately, but with jQuery
Adds the given function to jQuery
Runs the given function before the page has loaded
Runs the given function when the page is fully loaded
JavaScript and jQuery basics

Show answer
Auto Play
Slide 1 / 24
SLIDE
Similar Resources on Wayground
18 questions
Taylor Swift
Presentation
•
KG - Professional Dev...
16 questions
Feelings
Presentation
•
1st Grade - Professio...
20 questions
Aptitude Test
Presentation
•
KG - University
18 questions
Lesson 7.5 - Roosevelt's New Deal
Presentation
•
8th - 9th Grade
17 questions
SOCIALIZING
Presentation
•
KG - University
17 questions
Plural nouns
Presentation
•
KG - Professional Dev...
20 questions
Get Smart Plus 3 Topic 8 was/were
Presentation
•
1st - 4th Grade
20 questions
One Step Equations
Presentation
•
KG - University
Popular Resources on Wayground
15 questions
Grade 3 Simulation Assessment 1
Quiz
•
3rd Grade
22 questions
HCS Grade 4 Simulation Assessment_1 2526sy
Quiz
•
4th Grade
16 questions
Grade 3 Simulation Assessment 2
Quiz
•
3rd Grade
19 questions
HCS Grade 5 Simulation Assessment_1 2526sy
Quiz
•
5th Grade
17 questions
HCS Grade 4 Simulation Assessment_2 2526sy
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
24 questions
HCS Grade 5 Simulation Assessment_2 2526sy
Quiz
•
5th Grade
20 questions
Math Review
Quiz
•
3rd Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
18 questions
Company Logos
Quiz
•
6th - 8th Grade
20 questions
Inventor Terms Exercise #1a
Quiz
•
9th Grade
31 questions
Inventor Vocabulary Review Sheet
Quiz
•
9th Grade
26 questions
Final Exam Review 1
Quiz
•
11th Grade
24 questions
whos that pokemon
Quiz
•
5th Grade
10 questions
Exploring Cybersecurity Techniques and Threats
Interactive video
•
6th - 10th Grade
9 questions
Health
Interactive video
•
6th - 8th Grade