JavaScript Fundamentals – Variables and Input Function

JavaScript Fundamentals – Variables and Input Function

Assessment

Flashcard

Computers

12th Grade

Practice Problem

Hard

Created by

Liwayway Macatimpag

FREE Resource

Student preview

quiz-placeholder

24 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What is a variable in JavaScript?

Back

A variable is a container for storing data values. It can hold values or expressions.

2.

FLASHCARD QUESTION

Front

What are the rules for naming variables in JavaScript?

Back

1. Must begin with a letter. 2. Case sensitive. 3. Cannot be a reserved word. 4. Cannot use special characters except underscore (_).

3.

FLASHCARD QUESTION

Front

What are JavaScript keywords?

Back

Keywords are reserved words in JavaScript that have special meaning, such as 'break', 'case', 'catch', 'function', etc.

4.

FLASHCARD QUESTION

Front

What are the six data types in JavaScript?

Back

1. Numbers 2. Booleans 3. Strings 4. Objects 5. Null 6. Undefined

5.

FLASHCARD QUESTION

Front

What is the difference between global and local variables?

Back

Global variables are accessible anywhere in the code, while local variables are only accessible within the function they are declared.

6.

FLASHCARD QUESTION

Front

How do you declare a global variable in JavaScript?

Back

By simply assigning a value to it, e.g., globalVariable = 100;

7.

FLASHCARD QUESTION

Front

How do you declare a local variable in JavaScript?

Back

By using the 'var' keyword within a function, e.g., var counter = 0;

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?