Basics Flashcards
List all 8 datatypes in javascript
Number, String, Object, null, undefined, boolean, bigint, symbol
largest value of number data type in javascript(both +ve and -ve)
2^53 - 1 — about 9 quadrillion
-(2^53 - 1)
special values in number datatype
Nan, Infinity, -Infinity
is there a % operation in javascript?
yes
this primitive data type does not exist in javascript
character
typeof(null) = ?
why does this happen?
object
null is not of object type, it is just what typeof returns when its operator is null
what is the functionality of having a modal on the webpage?
to stop all interactions(clicks, textareas, etc) till user has interacted with modal.
Number(“a string that can’t be converted to a number”)
NaN
These are the methods used to perform String, Number, and Boolean conversions
String(), Number(), Boolean()
Boolean(“0”) = ?
true
It is a non-empty string.
These values on Boolean conversion become false.
NaN, “”, null, undefined, 0
This is the only arithmetic operator that converts number operands to string operands,
+
All others convert strings to numbers.
This operator does the same thing as Number() conversion method
unary + method.
the alert function returns value of this type
undefined
switch case uses strict comparison ===. True/False ?
True