Top JavaScript Interview Questions Revealed from a Real Phone Interview

An insider recounts a mid‑autumn phone interview at a major tech firm, detailing the nervous preparation, the unexpected direct jump to technical questions on JavaScript, cross‑origin issues, event handling, and HTML/CSS, and concludes with the surprising early offer and reflections on the experience.

Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
Top JavaScript Interview Questions Revealed from a Real Phone Interview

This article, originally posted by casper on SegmentFault, recounts a phone interview experience that took place on a rainy Mid‑Autumn day in 2010. The author describes the nervous anticipation before the interview, the surprise of jumping straight into technical questions, and the courteous tone of the interviewer.

Technical Interview Questions

JavaScript

How does JavaScript implement inheritance?

What is the prototype of an object?

How does JavaScript achieve encapsulation of data and functionality (i.e., class implementation)?

If a page contains 10,000 images, how can you efficiently bind click events to all of them (testing event bubbling)?

Given objects A and B, where A has an event S bound, how would you also bind event S to B?

How can cross‑origin requests be implemented? List the methods you know and their pros/cons.

When using a hidden iframe for cross‑origin requests, can it work if the iframe page and the current page are not under the same parent domain?

How to create a private variable? Provide one method.

Is the closure pattern used frequently? When is it necessary?

When an event occurs, how do you obtain the event target (differences between Firefox and IE)?

When binding an event, what does the this pointer refer to?

When binding an event to document, what does the this pointer refer to?

What are the steps to send an AJAX request? How do you determine success (readyState and onreadystatechange)?

What status code indicates a successful request? List other status codes you know and their meanings.

jQuery

How do you bind events in jQuery? How many ways are there?

When binding an event in jQuery, what does the this pointer refer to (DOM element or jQuery object)?

How do you bind events to elements that do not exist in the DOM at the time of binding?

Why choose the jQuery framework? Compare it with other frameworks and discuss their advantages and disadvantages.

Have you considered using jQuery UI? How would you customize its styles?

Have you ever written a jQuery plugin? How do you create one?

HTML + CSS

Implement a layout where the left column has a fixed width and the right column fills the remaining space.

Explain the difference between and tags. Which would you choose and why?

Discuss your understanding of HTML semantic tags.

After the first interview, the interviewer informed the candidate that the result would be communicated within two weeks. A week later, a second‑round call arrived, and the interviewer unexpectedly announced that the candidate had passed the first round and would be invited to a second interview, praising the candidate’s performance.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

interviewCSSHTMLjQuery
Tencent IMWeb Frontend Team
Written by

Tencent IMWeb Frontend Team

IMWeb Frontend Community gathering frontend development enthusiasts. Follow us for refined live courses by top experts, cutting‑edge technical posts, and to sharpen your frontend skills.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.