0% found this document useful (0 votes)
15 views9 pages

Interview Questions

Uploaded by

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

Interview Questions

Uploaded by

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

S.

No Category Questions Answer Hints


1 HTML What is the d SVG: The Scalable Vector Graphics (SVG) is an XML-based image format that is
2 HTML What is the use The <figure> tag in HTML is used to add self-contained content like illustration
3 HTML What is the use The <iframe> HTML element represents a nested browsing context, embeddin
4 HTML Explain the dif The <div> tag is a block level element. The <span> tag is an inline element.
Session Storage:It stores data of current session only. It means that the data s
5 Basic JS Difference betw Local Storage:Local storage is another type of HTML5 Web Storage. In local st
The autocomplete attribute specifies whether or not an input field should hav
6 HTML How will you ad <input autocomplete="on|off">
Border:The border area surrounds the padding and the content, and can be a
7 CSS What is box modMargin:The margin area consists of space between the border and the margin
8 CSS Difference betwA reset file is a set of CSS rules that resets the styling of all HTML elements to a
9 CSS What are Pseudo elements and Pseudo classes?
10 CSS What do the following CSS selectors mean?
div, pdoes Calc The calc() CSS function lets you perform calculations when specifying CSS prop
How
11 CSS Sticky
12 CSS What’s the diffe Sticky positioning is a hybrid of relative and fixed positioning. The element is t
6 .Function
13 CSS What are the fiv7.Operater
14 Adv JS What is event l The event loop is a single-threaded loop that monitors the call stack and check
15 Adv JS What is differe Fetch allows to make network requests similar to XMLHttpRequest. Fetch ma
Outer function’s variables
16 Basic JS What is the concGlobal variables
17 Basic JS what will be the3,3,3
output? for (var i = 0; i < 3; i++) {
setTimeout(function
what will be the1output?log() {
18 Basic JS // D
(function(x) { A - 13, B - 9, C - 31, D - 17
19 Basic JS sum();
20 Basic JS what will be theReferenceError:
output? myFunc is not defined
myFunc();
const myFunc = function(){
console.log('My Function called');
}

21 Basic JS What is Type Coe Type Coercion refers to the process of automatic or implicit conversion of valu
22 Basic JS What is the useThe stopPropagation method is used to stop the event from bubbling up the e
23 Basic JS Explain the dif Asynchronous functions usually accept a callback as a parameter and executio
24 Basic JS What is an evenEvent delegation refers to the process of using event propagation (bubbling) t
25 Basic JS What are the diflet and const differ in that let allows reassigning the variable's value while con
26 Basic JS What is the diff for in: loops over enumerable property names of an object.
What is the outputfor of
of:below
Output: (new in
['J', 'o', ES6)
spread does
'h', 'n'] use an
operator object-specific iterator and loops over the val
array?
27 Basic JS
console.log([...'John']);
How Explanation:
do you usevar a = 1, b = 2;The string is an iterable type and the spread operator with in an
28 Basic JS It prevents the event from propagating the DOM
29 Basic JS diffrence b/w prStops callback execution and returns immediately when called.
30 Basic JS diffrence b/w calBoth .call and .apply are used to invoke functions and the first parameter will b
2
31 Adv JS What is generator 3 functions and what would be the output?
32 Adv JS What is Promises Asynchronous programming is a concept found in JavaScript. The processes ar
33 Basic JS Difference b/w sThe array.slice() removes items from the array and then return those removed
The splice() method affects the original array whereas slice() method doesn’t
Promise.all is a promise that takes an array of promises as an input (an iterable
34 Adv JS Explain promisesPromise.race() method will return the promise instance which is firstly resolve
reduce() method: It reduces all the elements of the array to a single value by
35 Basic JS Explain Map() Fi filter() method: It filters the elements of the array that return false for the app
{ name: "Thomas",}); species:"cat"}
36 Basic JS ] console.log(types);
37 Basic JS const arrayOfOddNumbers 101 = [1, 3, 5];
arrayOfOddNumbers[100]
What do you und = 199;
38 Adv JS The $() function is used as a wrapper to wrap objects into their jQuery counter
39 Adv JS What is jQuery.Usually, JS functions and variables use $ as a name. In jQuery, $ is just an alias
40 Basic JS diffrence b/w $(function) and document.ready is same it will call when dom is ready,
$(function(){});
What it would retwindow.load
$.ajax() will call
will return thewhen allobject
all ajax the web
, resources has been called
41 Adv JS
42 Adv JS What are defer adone() will return the promise
The async attribute downloads the script during an
parsing the document
const applies to bindings ("variables"). It creates immutable binding, but wi
i.e. yo
43 Basic JS Explain the diff Object.freeze works on values, and more specifically, object values. It makes a
let chars = ['A', 'B', 'A', 'C', 'B'];
44 Basic JS Remove duplicate let result =Dead
[...new Set(chars)];
Temporal Zone is a behaviour that occurs with variables declared using l
45 Adv JS What is a Temp It is a behaviour where we try to access a variable before it is initialized.
46 Web basics How can you prioritize SEO, maintainability, performance, and security in a web application?
47 Web basics How can we improve the performance of a webpage?
48 Web basics What is Cross Site Scripting (XSS) ?
49 Web basics Explain JavaScript Cookies.
50 Array Sort an array using custom code.
51 Array Write a function that takes an integer and returns the number of 1 bits it has.
52 Array Given an array of integers A, every element appears twice except for one. Find that single one
53 Cookies code Write code to set and get cookies.
CDN(Content Delivery Network) helps in serving content from locations closes
54 Web basics What is a CDN? CDN is used for improving the performance by reducing Latency, and loading
-based image format that is used to define two-dimensional vector-based graphics for the web. Unlike raster image (Ex .jpg, .gif, .png, etc
ined content like illustrations, diagrams, photos, or codes listing in a document.
browsing context, embedding another HTML page into the current one. It can be styled by JavaScript not directly with CSS.
tag Itis means
nly. an inline element.
that the data stored in session storage clear automatically when the browser is closed.
ML5 Web Storage. In local
ot an input field should storage,
have data is notenabled.
autocomplete deleted automatically when the current browser window is closed.
d the content, and can be applied to all the sides of the box or to selected side(s) - top, right, bottom, and/or left.
n the border and the margin. The margin does not possess its own background color and is completely transparent. It shows the backgrou
ng of all HTML elements to a consistent baseline. It is a ‘slash and burn’ approach that wipes out all the default styles and lets you start fro

ns when specifying CSS property values. It can be used anywhere a <length>, <frequency>, <angle>, <time>, <percentage>, <number>, or <
positioning. The element is treated as relative positioned until it crosses a specified threshold, at which point it is treated as fixed positione

tors the call stack and checks if there is any work to be done in the task queue. If the call stack is empty and there are callback functions in
XMLHttpRequest. Fetch makes it easier to make asynchronous requests and handle responses better than with the older XMLHttpReques

or implicit conversion of values from one data type to another. This includes conversion from Number to String, String to Number, Boolean
vent from bubbling up the event chain
as a parameter and execution continue on the next line immediately after the asynchronous function is invoked. The callback is only invok
ent propagation (bubbling) to handle events at a higher level in the DOM than the element on which the event originated. It allows us to a
he variable's value while const does not.
an object.
rator and loops over the values generated by that.
spread operator with in an array maps every character of an iterable to one element. Hence, each character of a string becomes an eleme

when called.
and the first parameter will be used as the value of this within the function. However, .call takes in comma-separated arguments as the ne

JavaScript. The processes are run separately from the main thread in asynchronous programming. Promises are the most convenient appr
d then return those removed items as an array whereas array.slice() method is selected items from an array and then those elements as a
reas slice() method doesn’t affect the original array.
mises as an input (an iterable), and it gets resolved when all the promises get resolved or any one of them gets rejected.
he arraywhich
stance is firstly
to a single resolved
value or rejected.
by repeatedly applying a function. It is an alternative of using a loop and updating the result for every scanned ele
that return false for the applied condition and returns the array which contains elements that satisfy the applied condition.

cts into their jQuery counterparts. This is done to give users the ability to call any method that is defined for the jQuery object.
e. In jQuery, $ is just an alias for jQuery, so we don’t need to use $. If we have to use a JS library along with jQuery, the control of $ is given
when dom is ready,
has been called

narsing the document


immutable binding, but will pause
i.e. you cannotthe parser
assign to execute
a new value tothe
thescript before it has fully finished parsing. async scripts will not necessarily ex
binding.
ally, object values. It makes an object immutable, i.e. you cannot change its properties.
th variables declared using let and const keywords.
before it is initialized.
urity in a web application?

for one. Find that single one.


ontent from locations closest.CDN serves Static Content Files and Pre-generated Files like CSS, HTML, JS, etc. It is also involved in serving D
ducing Latency, and loading on the servers that are also reduced when we do not have to serve the content.
mage (Ex .jpg, .gif, .png, etc.), a vector image can be scaled up or down to any extent without losing the image quality.

tly with CSS.

eft.
arent. It shows the background color of the element, like the body element.
t styles and lets you start from scratch.

percentage>, <number>, or <integer> is allowed.


t is treated as fixed positioned.

here are callback functions in the task queue, a function is dequeued and pushed onto the call stack to be executed.
h the older XMLHttpRequest. It is an improvement over the XMLHttpRequest API. The main difference between Fetch() and XMLHttpRequ

g, String to Number, Boolean to Number etc. when different types of operators are applied to the values.

ed. The callback is only invoked when the asynchronous operation is complete and the call stack is empty.
originated. It allows us to attach a single event listener for elements that exist now or in the future. Inside the Event Handling Function.

of a string becomes an element within an Array.

parated arguments as the next arguments while .apply takes in an array of arguments as the next argument. An easy way to remember thi

re the most convenient approach to deal with asynchronous programming in ES6. Depending on the outcome of the procedure, a promise
d then those elements as a new array object.
result for every scanned element.
ied condition.

he jQuery object.
ery, the control of $ is given to the JS library. To give this control, we use jQuery.noConflict(). It is also used to assign a new name to a vari

cripts will not necessarily execute in order.

is also involved in serving Dynamic Content such as rich media.


n Fetch() and XMLHttpRequest() is that the Fetch API uses Promises, hence avoiding callback hell.

Event Handling Function.

n easy way to remember this is C for call and comma-separated and A for apply and an array of arguments.

of the procedure, a promise can be refused or resolved. Callbacks were used to cope with asynchronous programming before promises we
assign a new name to a variable.
amming before promises were introduced in ES6.

You might also like