JavaScript Functions and Scope of Variables

JavaScript Functions and Scope of Variables

6th Grade

7 Qs

quiz-placeholder

Similar activities

Fundamentos de Programación en Python

Fundamentos de Programación en Python

6th Grade - University

10 Qs

Understanding Functions in Informatics

Understanding Functions in Informatics

6th Grade

10 Qs

Ulangkaji ASK

Ulangkaji ASK

6th - 8th Grade

12 Qs

Express Course (v2024) Quiz 3

Express Course (v2024) Quiz 3

6th - 8th Grade

10 Qs

Robotics and AI trivia for kids

Robotics and AI trivia for kids

1st - 6th Grade

10 Qs

Digital Citizenship - Comprehensive Activity

Digital Citizenship - Comprehensive Activity

1st - 6th Grade

12 Qs

Đề cương Công Nghệ Lớp 5 Kì 2

Đề cương Công Nghệ Lớp 5 Kì 2

5th Grade - University

12 Qs

Strand D-Coding

Strand D-Coding

6th Grade

12 Qs

JavaScript Functions and Scope of Variables

JavaScript Functions and Scope of Variables

Assessment

Quiz

Information Technology (IT)

6th Grade

Medium

Used 1+ times

FREE Resource

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