
Javascript Datatypes and Variables(Kushal Das)
Authored by Kushal Das
Computers
Professional Development
Used 7+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
In Replit, we have created a file named “DemoFile.js”, which command is used to run the JavaScript code within it.
run DemoFile
run DemoFile.js
node DemoFile
node DemoFile.js
Answer explanation
Answer Explanation :
On Replit, click the shell tab on the right. Effectively this gives you a terminal and access to node.js.
node <file name> is the command to get node to run your program, in our case file name is “DemoFile.js”.
Please note: DemoFile.jsand DemoFile are two different files.
2.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
JavaScript can be used for?
Creating web pages
Game Development
Building web servers
All of the Above
Answer explanation
You can use JavaScript for multiple purposes like creating web pages, game development, building web servers, etc.
3.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
JavaScript is ________________ typed language.
Statically
Dynamically
Strongly
None of the Above
Answer explanation
JavaScript is a dynamically-typed language where the interpreter assigns variables a type at runtime based on the variable's value at the time.
This means below code snippet is valid in JavaScript:
let num = 1;
num = "some string";4.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
Which of the following is not a data type?
String
null
number
char
Answer explanation
In JavaScript, char is not a data type.
5.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
___________ data type is used to represent the intentional absence of any value.
undefined
boolean
null
None of the Above
Answer explanation
null used for intentionally missing values.
6.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
What will be the output of the below code snippet:
var num;
console.log(num);null
undefined
number
string
Answer explanation
Variable num is only declared not assigned any value hence the output will be undefined.
7.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
Which is the correct statement for declaring a variable "myName" with its initial value as “Kushal”? (Camel Case)
var
myName="Kushal";
var myname="Kushal";
var MyName="Kushal";
All of the above
Answer explanation
JavaScript is a case-sensitive language. This means that capitalisation matters. Variable myName is not the same as MyName nor myname. It is possible to have multiple distinct variables with the same name but different casing.
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?
Similar Resources on Wayground
15 questions
Javascript basics
Quiz
•
Professional Development
16 questions
Keyboard Types
Quiz
•
Professional Development
10 questions
Handling sensitve information on conference calls
Quiz
•
Professional Development
15 questions
4.6.4 Logic Gates
Quiz
•
10th Grade - Professi...
10 questions
Public Key Infrastructure
Quiz
•
Professional Development
10 questions
C++Quiz#1
Quiz
•
Professional Development
13 questions
Five Nights At Freddy's: Security Breach Quiz
Quiz
•
KG - Professional Dev...
10 questions
all star
Quiz
•
Professional Development
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Computers
10 questions
How to Email your Teacher
Quiz
•
Professional Development
6 questions
3RD GRADE DECLARATION OF INDEPENDENCE EXIT TICKET
Quiz
•
Professional Development
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
22 questions
Multiplying Exponents with the Same Base
Quiz
•
9th Grade - Professio...
40 questions
Flags of the World
Quiz
•
KG - Professional Dev...