Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
2 views2 pages

ES6 Flag

The document provides an overview of key JavaScript concepts, including ES6 features, variable declarations (var, let, const), default parameters, the spread operator, classes vs. objects, prototype chains, call by value vs. call by reference, scopes, higher-order functions, APIs, storage types (local vs. session), cookies, object-oriented programming, and differences between arrays and linked lists. It also mentions debugging JavaScript applications using browser developer tools. Each concept is briefly explained with examples where applicable.

Uploaded by

shahriar prabal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

ES6 Flag

The document provides an overview of key JavaScript concepts, including ES6 features, variable declarations (var, let, const), default parameters, the spread operator, classes vs. objects, prototype chains, call by value vs. call by reference, scopes, higher-order functions, APIs, storage types (local vs. session), cookies, object-oriented programming, and differences between arrays and linked lists. It also mentions debugging JavaScript applications using browser developer tools. Each concept is briefly explained with examples where applicable.

Uploaded by

shahriar prabal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1.Tell me about ES6?

ans:ES6 is the standard version of Js. Also known as Ecma Script.New features were
introduced in ES6 like
●​ Arrow function
●​ Let and const keyword
●​ Multiline string
●​ Template string
●​ destructuring
2.Difference between var,let and const?
Ans:var is keyword used to define variable.let and const is also used keyword for
variable.suppose if we declare something using var then we can redeclare that variable again
and we put different type of value.If we declare using let then we can’t redeclare that variable
also we can put different data but not different data type.if we declare something using const
keyword we can’t change the data in the variable.
3.why will you use default parameters?
Ans:if we don’t use default parameter suppose I have given two parameter to a function but I
have passed single argument then it will create an error which is not expected that’s why default
parameter should be used.
4.How does spread operator work?
Ans:”...”,this three dot is known as spread operator.it gives only the value of an array or object
not the syntax.it is used to copy an array or object.
Let a=[1,2,3,4,5]
…a will be 1,2,3,4,5
5.difference between class and object?
ans:Class is like a blue print.By using this blue print many object can be created.class is a
logical entity while object is a physical entity.a class can be created once many objects can be
created using that class.classes don’t have values while objects has values.
6.what is prototype chain?
Ans:all objects in js inherit the properties and methods from object.prototype.this is known as
prototype chaining.
7.call by value and call by reference?
Ans:call by value means we pass the value as arguments to the function but in call by reference
instead of passing the values we pass the address of the values.In call by reference as we pass
the address of the values there will be no mistake because suppose if we define int parameter
and we pass float value it will not give the result we wanted .
8.what is scope in js?
Ans:The current context of execution.in where the variable or other expression are used.if a
parent scope declare a variable or function it can be used by the child in that scope but vice
versa is not possible.
9.what is higher order function?
Ans:higher order function is special order function in js which will take either function as an
argument or return a function.
10.What is API?
ans:API is a application program interface.It makes relation between the backend and front
end.API is like a waiter in a restaurant.suppose you want to eat something.you told the waiter
waiter get to kitchen ask the cooks then fetch the food and bring it to you.fetch also work like
that.
GET method works when you want to fetch data from the server and POST method is used
when you want to send data to the server.
11.difference between local storage and session storage?
ans:when we open a website a part of data is saved in local storage.If we closed that website
then still the data is saved in that browser for a certain amount of time.If we even closed the
browser the data is stored in local storage.
we open a website a session is stored in a session storage if we closed that tab and create a
new tab then another new session storage is created. Every time a new session is created new
session storage is created and previous one get deleted that's how session storage works.

12.What are cookies and why will you use it?

Ans:cookies are small piece of text sent to you by the website.It helps the website to remember
the information about you so that when you will visit the website again you get better user
experience

13.what is oop?

Ans:object oriented programming is like you can create your own design of codes using different
kinds of data type and methods then you can create an object using that structure you have
defined earlier.The structure you have created is known as class.By using that class you can
create as many objects you want.

14.diffrence between array and linked list?

Ans:array used sequential addressing.like if the first data in 2001 second data will be in 2004
but linked list you have two section one is data part and another one is the linked part which will
address to the next node.link list consume more memory where array contains less
memory.random access is not possible in linked list which is possible in array

15.How will you debug a js Application?

Ans:with the help of browser devtool.

You might also like