NEW
Font size
WorksheetsJavaScript Scope, Arrays, Loops, and Iterators
Total questions: 30
Worksheet time: 15mins
Repeating a task multiple times in programming is known as ?
Iterators
Scope
Looping
When JavaScript begins counting with 0, it is known as ?
Zero-indexed
Arrow Function
Looping
Refers to where a variable can be accessed in a program.
Arrays
Scope
Iterators
A variable defined in the block {} is only accessible within the curly braces is known as ?
Infinite Loop
Arrow Function
Block Scope
When there is an error in the logic of the loop because the stopping condition is never reached.
Arrays
Infinite Loop
Looping
When we can change the contents of an array, but cannot reassign the variable name to a new array or other data type.
Muteable
Arrow Function
Global Scope
All iterator methods can be written using ? syntax.
Zero-indexed
Global Scope
Arrow Function
Refers to variables that are accessible to every part of the program.
Global Scope
Block Scope
Muteable
This is JavaScript's way of making lists.
Scope
Iterators
Arrays
These complete such tasks as altering each element and selecting elements that fit certain criteria.
Scope
Iterators
Arrays
While some variables can be accessed from anywhere within a program, other variables may only be available in a specific context.
True
False
Scope depends entirely on where a variable is declared.
True
Flase
Arrays can only store certain types of data.
True
False
Each item in an array has a numbered position.
True
False
.length allows us to add items to the end of an array.
True
False
Arrays are lists and are a way to store data in JavaScript.
True
False
.push allows you to see how many items are in an array.
True
False
.pop removes items from an array.
True
False
We can make our loop run backward by using -- instead of ++.
True
False
The scope brings the loop from start to stop.
True
False
for loops allow us to repeat a block of code a known amount of times.
True
False
It is a best practice to give parameters descriptive names so that other developers who read your code can easily understand what it does.
True
False
.filter() executes the same code on every element in an array and returns a new array with updated elements.
True
False
.map() checks every element in an array to see if it meets certain criteria and returns a new array with the elements that returns truthy for the criteria.
True
False
Variables defined in the global scope are declared outside of a set of curly braces and are available throughout a program.
True
False
Each item inside of an array is at a numbered position, starting at ?
1
0
To compare items in two arrays, we use _____ for loops.
invested
arrayed
nested
_____ loops let us loop a block of code a known amount of times.
while
for
As long as the condition evaluates to _____, the block of code will loops.
true
false
_____ loops let us loop a block of code an unknown amount of times.
for
while
