I have been reading eloquent javascript from some days . It is good with easy explanation of each and every topic of javascript . But still after reading every chapter , I forgot what was there in previous chapter which I think is very normal until you read each chapter two three times or make notes. In this article I will be using old school method which is answering questions related to chapter after reading chapter from eloquent javascript . I have made some question from each chapter after reading and you can test yourself as well of what are the points you have understood and what are topics you still have to work on.
Chapter 1: Values, Types, and Operators
Q1. what are different data types in javascript?
ans . There are 7 basic data types in JavaScript.
- 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’
- Boolean : JavaScript has a Boolean type, which has just two values, true and false, which are written as those words…
-
null
for unknown values – a standalone type that has a single valuenull
. -
undefined
for unassigned values – a standalone type that has a single valueundefined
. -
object
for more complex data structures. -
symbol
for 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.
Q4 what are empty values in javascript ?
ans. The two empty values in javascript are null and undefined.These are used to denote absence of meaningful value. These themselves are values but don’t contains any information.
You can reply with your questions related to chapter as well . I would love to add as many questions as I can.