Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

51.

Which of the following is not a method of AJAX?(a) get()(b) getJSON()(c) post()(d) stop()This question was addressed to me during an internship interview.The question is from Essential JavaScript and jQuery topic in portion HTML Tables, Javascript & Jquery Basics of HTML

Answer»

Right choice is (d) STOP()

To EXPLAIN I would say: AJAX is basically used for exchanging data with server. There are SEVERAL methods in jQuery for AJAX. Ajax(), ajaxSetup(), ajaxPrefilter(), ajaxTransport(), getJSON(), post(), ajaxSend(), ajaxError(), LOAD(), serializeArray(), serialize(), ajaxStop(), ajaxStart() are some of the methods.

52.

Which method is not for traversing DOM tree sideways?(a) parent()(b) siblings()(c) prev()(d) nextAll()The question was asked in an interview for job.The origin of the question is Essential JavaScript and jQuery topic in portion HTML Tables, Javascript & Jquery Basics of HTML

Answer»

The correct option is (a) parent()

For EXPLANATION: There are methods for traversing DOM TREE SIDEWAYS. Some of them are NEXT(), prev(), prevAll(), nextAll(), siblings(), prevUntil(), next(). All the sibling elements are returned by siblings() method. The next sibling is returned by next() method. All the next siblings are returned by nextAll() method.

53.

typeof “null” in JavaScript is _______(a) number(b) string(c) object(d) undefinedThis question was posed to me during an online exam.The question is from Essential JavaScript and jQuery in section HTML Tables, Javascript & Jquery Basics of HTML

Answer» CORRECT answer is (c) OBJECT

For EXPLANATION: TYPEOF “null” in JavaScript is an object. Basically null INDICATES nothing like it is a thing that does not exist. It is like a bug in JavaScript that its typeof comes to be an object. For emptying an object we can set it to null.
54.

Which attribute defines numbers of columns in a group?(a) width=multi-length[CN].(b) span=number[CN].(c) scope=scope-name[CN].(d) headers=idrefs[CS].This question was posed to me during an interview.My question is taken from Working with Tables topic in chapter HTML Tables, Javascript & Jquery Basics of HTML

Answer»

Right choice is (b) span=NUMBER[CN].

For explanation I would say: span=number[CN] attribute’s value must be an integer and greater than 0. It specifies the number of columns in a group. When span attribute is not in use, colgroup defines a single column group containing one column. WIDTH=multi-length[CN] specifies default width of for every column. scope=scope-name[CN] specifies set of data CELLS for which GOING header cell gives header information. The headers=idrefs[CN] PROVIDES list of header cells that gives header information.

55.

border-spacing is given in _____________(a) pixels(b) cm(c) mm(d) inchI had been asked this question in a job interview.The origin of the question is Working with Tables in section HTML Tables, Javascript & Jquery Basics of HTML

Answer» RIGHT answer is (a) pixels

The best I can explain: border-spacing and border-collapse are the two properties by which one can set the border and its styling in a table. We GIVE its value in pixels.


For explanation I WOULD say: Column cell, Row, and ROWS are the container elements. They have a class attribute with the HELP of this we can apply SPECIAL styling. Table alignment is also controlled style sheet classes. Text-align and vertical-align are the style ATTRIBUTES that align the content of the table.

56.

Which of the following element is not associated with a class attribute?(a) Row(b) (c) Column cell(d) RowsThis question was posed to me in an interview for job.My doubt stems from Working with Tables topic in chapter HTML Tables, Javascript & Jquery Basics of HTML

Answer»

Right answer is (b)

57.

Which is not the property of location object?(a) origin(b) port(c) host(d) geolocationI have been asked this question in a job interview.This is a very interesting question from Essential JavaScript and jQuery topic in section HTML Tables, Javascript & Jquery Basics of HTML

Answer»

Right ANSWER is (d) geolocation

To ELABORATE: The properties of location object are HOST, origin, port, pathname, HOSTNAME, href, hash, protocol, search. The port number of URL is set by port. The entire URL is set by href, path name of URL is set by pathname property, protocol of URL is set by protocol property.

58.

Which of the following is not the jQuery method for manipulation?(a) stop()(b) html()(c) text()(d) val()I have been asked this question in unit test.I want to ask this question from Essential JavaScript and jQuery in division HTML Tables, Javascript & Jquery Basics of HTML

Answer»

The correct choice is (a) stop()

Explanation: For attributes manipulation we USE three METHODS named html(), TEXT() and val(). The CONTENT of selected elements is returned by html(). The text content of selected elements is returned by text(). The values of form FIELDS is returned by val().

59.

For displaying data in JavaScript, we can’t use ____________(a) document.write()(b) console.log()(c) innerHTML(d) document.getElementById()I have been asked this question in unit test.Enquiry is from Essential JavaScript and jQuery topic in section HTML Tables, Javascript & Jquery Basics of HTML

Answer»

Correct choice is (d) document.getElementById()

For explanation I would say: We can display data in many WAYS in JAVASCRIPT.They are innerHTML, console.log(), window.alert(), document.write. document.getElementById(id) is a method used for ACCESSING HTML element by JavaScript. Here id defines the HTML element.

60.

Which of the following does not specify a column width?(a) Fixed(b) Percentage(c) Proportional(d) PixelsI have been asked this question in unit test.The doubt is from Working with Tables in division HTML Tables, Javascript & Jquery Basics of HTML

Answer»

The correct OPTION is (d) PIXELS

To elaborate: We can SPECIFY column WIDTH in three ways i.e. Percentage, Fixed, Proportional. Fixed width is given in pixels. Percentage specification is the percentage of HORIZONTAL space availability in the table. The proportional specification is the portions of fixed horizontal space required for the table.