June 24, 2019

Srikaanth

Hexacta Most Frequently Asked JavaScript Interview Questions

Hexacta Most Frequently Asked Latest JavaScript Interview Questions Answers

List out the Mouse Events.

There are altogether 9 mouse events. Here is the list:

1.    click: A single click

2.    dblclick: A double click

3.    mousedown: When the mouse button is clicked down.

4.    mouseup: When the mouse button is released up.

5.    mouseenter: When the mouse cursor enters an external element.

6.    mouseleave: When the mouse cursor leaves an external element.

7.    mouseover: When the mouse cursor enters an internal and external element.

8.    mouseout: When the mouse cursor leaves an internal and external element.

9.    mousemove: When the mouse cursor is moved.

What is the use of history object?

By using the history object you can change or switch back to history pages or forward from current page to another page.

What is an Event Bubbling in Javascript?

When an event is fired on an HTML element, the execution starts from that event and goes to its parent element. From there, the execution passes to its parent element and so on till the body element.

What does window.print() do in Javascript?

The print() function from window object prints the current web page when executed.
Hexacta Most Frequently Asked Latest JavaScript Interview Questions Answers
Hexacta Most Frequently Asked Latest JavaScript Interview Questions Answers

How can a Javascript code redirect the user to a different page?

The window.location is assigned a value; i.e., a web link. On its execution, the Javascript code can redirect the user to the mentioned web link.

What are Cookies in Javascript?

A Cookie is a variable that is stored on a client's/visitors machine. Using Cookies, the servers can identify the client and the client's transactions.

How do Javascript primitive/object types passed in functions?

Primitive types in Javascript are passed by value; whereas, object types are passed by reference.

What is NaN in Javascript?

NaN is a short form of Not a Number. When a string or something else is being converted into a number and that cannot be done, then we get to see NaN. A strange thing about NaN is that it is not equal to anything including itself.

List out all the falsifying tokens in Javascript.

There are 6 tokens that falsify in Javascript and they are false, null, undefined, 0, NaN.

What is Currying in Javascript?

A partial invocation of a Javascript function is called Currying. Few arguments of a function are processed and a function is returned. Few more arguments are added by the returning function.

When do we use JSON.stringify()?

The JSON.stringify() method is used to convert a Javascript data to a string.

What does unshift() function do in Javascript?

Just like push() which inserts elements into an array at the end of it, the unshift() function inserts elements at the beginning of an array.

Why jQuery is needed?

jQuery is needed for the following list:

Used to develop browser compatible web applications

Improve the performance of an application

Very fast and extensible

UI related functions are written in minimal lines of codes

Whether jQuery HTML work for both HTML and XML documents?

No, jQuery HTML only works for HTML documents not for XML Documents.

What are the methods used to provide effects?


Some of the effects methods are:

Show()
Hide()
Toggle()
FadeIn() and
FadeOut()

What is the advantage of using minimized version of jQuery?

Efficiency of web page increases when minimized version of jQuery is used.min.js file will be more than 50% less than the normal js file. Reduction in the file size makes the web page faster.

Is jQuery is a JavaScript or JSON library file?

jQuery is a library of JavaScript file and it consists of DOM, event effects and the Ajax functions. jQuery is said to be a single JavaScript file.

Which operating system is more compatible with jQuery?

Mac, Windows and Linux are more compatible with the jQuery.

How can we include jQuery library in ASP.Net project?

Download the jQuery library from jQuery.com and include that reference in the asp.net page.

Which command will give a version of jQuery?

The command $.ui.version returns jQuery UI version.

In what scenarios jQuery can be used?

jQuery can be used in following scenarios:

Apply CSS static or dynamic
Calling functions on events
Manipulation purpose
Mainly for Animation effects

What is the difference between find and children methods?

Find method is used to find all levels down the DOM tree but children find single level down the DOM tree.

What is jQuery connect?

A ‘ jQuery connect’  is a plugin used to connect or bind a function with another  function. Connect is used to execute function from any other function or plugin is executed.

How to use connect?

Connect can be used by downloading jQuery connect file from jQuery.com and then include that file in the HTML file. Use $.connect function to connect a function to another function.

Subscribe to get more Posts :