
JavaScript Functions and Scope of Variables
Information Technology (IT)
6th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
7 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following best describes a global variable?
A variable that is only accessible within a loop
A variable that is accessible throughout the entire program
A variable that is only accessible within a class
A variable that is only accessible within a function
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What keyword is used to declare a local variable in JavaScript?
let
const
var
function
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a global variable?
A variable declared inside a function
A variable declared outside a function
A variable that cannot be accessed by any function
A variable that is only accessible within a loop.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if you assign a value to a variable that has not been declared with the 'var' keyword?
A) It becomes a local variable
B) It becomes a global variable
C) It causes an error
D) It becomes a constant.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does a rating of 4 mean in the self-assessment table?
I can do this independently.
I am an expert and I can teach the class.
I can do this with help.
I can't do this with help.
6.
DRAG AND DROP QUESTION
30 sec • 1 pt
Fill in the blank: A rating of 1 in the self-assessment table means 'I can't do this with help. I need a (a) lesson.'
tutorial
video
practice
guide
7.
DRAG AND DROP QUESTION
30 sec • 1 pt
Fill in the blank: The syntax of a function in JavaScript is written by (a) .
Executers
Programmers
Debuggers
Designers
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?