Intro to JS: Variables & Values

Quiz
•
Information Technology (IT)
•
11th Grade
•
Medium
Tiffany Hale
Used 3+ times
FREE Resource
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the primary purpose of a scripting language like JavaScript?
To create operating systems
To write small programs or scripts for common tasks
To design hardware components
To manage databases
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following statements correctly declares a variable in JavaScript?
`int number = 5;`
`var number = 5;`
`let number = 5;`
`const number = 5;`
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Explain the difference between a variable and a value in JavaScript.
A variable is a fixed number, while a value can change.
A variable is a signifier that points to a value, which is the actual data.
A variable is a type of data, while a value is a function.
A variable is a string, while a value is a number.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following JavaScript code? ```javascript var x = 10; var y = 5; console.log(x + y); ```
5
10
15
50
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Why is JavaScript considered a loosely typed language?
Because it requires explicit type declarations for variables
Because it automatically determines the type of a variable based on its value
Because it does not support data types
Because it only supports string and number types
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Given the following code, what will be the output? ```javascript var greeting = "Hello, "; var name = "Alice"; console.log(greeting + name); ```
Hello,
Alice
Hello, Alice
greeting + name
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following scenario: You need to store a user's age and name in a JavaScript program. Which data types would you use for each, and why?
Use a String for age and a Number for name, because age is a sequence of characters.
Use a Number for age and a String for name, because age is a numerical value and name is a sequence of characters.
Use a Boolean for both, because they are simple data types.
Use an Array for both, because they can store multiple values.
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the significance of using a REPL environment like Repl.it for learning JavaScript?
It allows for the creation of complex web applications.
It provides a platform to experiment and try out new ideas interactively.
It is the only way to run JavaScript code.
It automatically optimizes JavaScript code for performance.
Similar Resources on Wayground
8 questions
Intro to JS: JS and the Browser

Quiz
•
11th Grade
10 questions
Codean | TypeScript dan React

Quiz
•
University
10 questions
AV1 - 3Tri - Mat II - Prog I

Quiz
•
11th Grade
10 questions
Prueba de Desarrollo Web

Quiz
•
11th Grade
6 questions
Javascript Intro Parte I

Quiz
•
12th Grade
10 questions
3TDS - Programação Mobile - Recuperação 2

Quiz
•
12th Grade
10 questions
Dasar Koding dan Kecerdasan Artifisial

Quiz
•
11th Grade - University
10 questions
Web Development Quiz

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Information Technology (IT)
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
20 questions
Getting to know YOU icebreaker activity!

Quiz
•
6th - 12th Grade
10 questions
Impact of 9/11 and the War on Terror

Interactive video
•
10th - 12th Grade
28 questions
Ser vs estar

Quiz
•
9th - 12th Grade
6 questions
Biography

Quiz
•
4th - 12th Grade
16 questions
Metric Conversions

Quiz
•
11th Grade
25 questions
ServSafe Foodhandler Part 3 Quiz

Quiz
•
9th - 12th Grade
10 questions
Fact Check Ice Breaker: Two truths and a lie

Quiz
•
5th - 12th Grade