Chapter 1: Values, Types, and Operators
- Number : for numbers of any kind: integer or floating-point.
- String : Strings are used to represent text. They are written by enclosing their content in quotes.
Down on the sea
“Lie on the ocean”
‘Float on the ocean’
nullfor unknown values – a standalone type that has a single value
undefinedfor unassigned values – a standalone type that has a single value
objectfor more complex data structures.
symbolfor unique identifiers.
Q2 Explain arithmetic operations ?
ans . Arithmetic operations such as addition or multiplication take two number values and produce a new number from them.
- for addition
- for subtractions
- for multiplication
- / divide two values and return quotient
- % divide two values and return remainder
Q3 Define special numbers?
ans . There are three types of special numbers .The first two are -Infinity and + Infinity .
infinity + 1 or infinity “-” 1 is infinity and “-”infinity.
The third one is NaN .NaN stands for Not a Number and is a number type .You”ll get this result when any number of arithmetic operation do not yield meaningful result . for eg 0 / 0 or subtracting infinity from infinity.
You can reply with your questions related to chapter as well . I would love to add as many questions as I can.