To start off let us talk about the basic data types in javascript language there are classified as primitive and composite datatype

primitive data type consists of your integer float double boolean strings whereas composite or derived datatypes consist of arrays, objects, and functions

for eg if var a = 10; which denotes a simple primitives data type which stores a value of 10 in variable a which can be changed any time

arr =[10,20] refers not to the value stored in the array rather it points to the memory location so that in composite datatype copy by value isn't feasible so it's copied by reference using a spread operator



HTTP is based on the Client/Server model. The client/server model can be explained as two computers, the Client (receiver of service) and the Server (provider of service) that are communicating via requests and responses.

HTTP 2 was a revised version of HTTP 1 with the shear motto of improving the following feature over HTTP 1 there are as follows :

  1. page-load speeds
  2. compatibility with HTTP 1
  3. binary protocol
  4. requesting multiplexing over a single TCP connection

HTTP can send multiple requests over a single TCP connection which allows us to download multiple files from the single server asynchronously

Header compression allows us to compress large redundant header frame

HTTP 1 uses text protocol to send a request whereas http2 uses the binary protocol to send the request