java scrit datatypes Flashcards
What are the seven data types in JavaScript?
Undefined, Null, Boolean, Number, BigInt, String, Symbol.
True or False: JavaScript is a statically typed language.
False.
Fill in the blank: The __________ data type represents a lack of value.
Null.
What is the data type of the value ‘42’ in JavaScript?
Number.
Which data type can represent integers larger than 2^53 in JavaScript?
BigInt.
True or False: Strings in JavaScript are immutable.
True.
What keyword is used to declare a variable in JavaScript?
var, let, or const.
What type of data is ‘true’?
Boolean.
What does the Symbol data type represent?
A unique and immutable identifier.
Fill in the blank: The __________ operator can be used to check the type of a variable.
typeof.
Multiple Choice: Which of the following is not a primitive data type in JavaScript? A) String B) Object C) Number D) Boolean
B) Object.
What data type would the expression ‘5’ + 5 evaluate to?
String.
What is the result of typeof NaN?
Number.
True or False: You can store multiple values in a variable of type Object.
True.
Fill in the blank: An array in JavaScript is a type of __________.
Object.
What is the default value of an uninitialized variable in JavaScript?
Undefined.
What data type is returned by the expression (3 === 3)?
Boolean.
Multiple Choice: Which data type can hold decimal numbers? A) String B) Number C) BigInt D) Boolean
B) Number.
What is the purpose of the Null data type?
To represent the intentional absence of any object value.
True or False: A Symbol can be created using the Symbol() function.
True.
Fill in the blank: The __________ data type is used to represent true or false values.
Boolean.
What will the value of typeof null return?
Object.
What is a primary characteristic of the BigInt data type?
It can represent integers with arbitrary precision.
Multiple Choice: Which of the following is a valid way to create a string? A) ‘Hello’ B) “Hello” C) Hello
D) All of the above
D) All of the above.