Front End Web Developer Interview Preparation Guide
Download PDF

Front End Web Developer related Frequently Asked Questions by expert members with professional career as Front End Web Developer. These list of interview questions and answers will help you strengthen your technical skills, prepare for the new job interview and quickly revise your concepts

76 Front End Web Developer Questions and Answers:

Table of Contents

Front End Web Developer Interview Questions and Answers
Front End Web Developer Interview Questions and Answers

1 :: Tell us what Is The Difference Between Call And Apply?

apply lets you invoke the function with arguments as an array. call requires the parameters to be listed explicitly.

2 :: Tell me what Are This And That Keywords?

This and that are important to variable scope in JavaScript.

3 :: What Is The Lazy Loading?

Lazy loading is a design pattern commonly used in computer programming to defer initialization of an object until the point at which it is needed.

Lazy loading is loading code only once user needs it. For Example, there is a button on the page, which shows different layout once user pressed it. So there is no need to load code for that layout on initial page load.

4 :: Explain me what Is Cors? How Does It Work?

Cross-origin resource sharing (CORS) is a mechanism that allows many resources (e.g., fonts, JavaScript, etc.) on a web page to be requested from another domain outside the domain from which the resource originated. It's a mechanism supported in HTML5 that manages XMLHttpRequest access to a domain different.

CORS adds new HTTP headers that provide access to permitted origin domains. For HTTP methods other than GET (or POST with certain MIME types), the specification mandates that browsers first use an HTTP OPTIONS request header to solicit a list of supported (and available) methods from the server. The actual request can then be submitted. Servers can also notify clients whether "credentials" (including Cookies and HTTP Authentication data) should be sent with requests.

5 :: Do you know what Is Ajax? Write An Ajax Call?

AJAX stands for asynchronous JavaScript and XML and allows applications to send and retrieve data to/from a server asynchronously (in the background) without refreshing the page. For example, your new Gmail messages appear and are marked as new even if you have not refreshed the page.

6 :: Tell me what Is The Importance Of The Html Doctype?

DOCTYPE is an instruction to the web browser about what version of the markup language the page is written. Its written before the HTML Tag. Doctype declaration refers to a Document Type Definition (DTD).

7 :: Please explain what Are The Difference Between Get And Post?

A GET request is typically used for things like AJAX calls to an API (insignificant changes), whereas a POST request is typically used to store data in a database or submit data via a form (significant changes). GET requests are less secure and can be seen by the user in the URL, whereas POST requests are processed in two steps and are not seen by the user. Therefore, POST requests are more secure.

8 :: Tell me what Is A Javascript Object?

A collection of data containing both properties and methods. Each element in a document is an object. Using the DOM you can get at each of these elements/objects and do some cool sh*t.

9 :: Explain me what is the importance of the HTML DOCTYPE?

DOCTYPE is an instruction to the web browser about what version of the markup language the page is written. Its written before the HTML Tag. Doctype declaration refers to a Document Type Definition (DTD).

10 :: Do you know what is Three.js & its important features?

Three.js is an open source JavaScript 3D library that enables you to make and display animated, interactive 3D computer graphics on any compatible web browser without having a dependency on proprietary plug-ins.

Key features of Three.js include

☛ Renderers
☛ Scenes
☛ Cameras
☛ Lights
☛ Animations
☛ Materials
☛ Shaders
☛ Objects
☛ Geometry
☛ Loaders
☛ Export/Import
☛ Debugging
☛ Support

11 :: Tell us have you used Sass? What's good about it?

Every web project starts with everything neat, all CSS is organized in blocks or different CSS files and you know where everything is, right?
Right, until your project gets bigger, deadlines get tight, more developers come on board and someday you notice a strange behaviour in some elements of the page. When you inspect their styles you spot lots of css overrides coming from everywhere. This is the moment you realise how messy CSS can be.

Sass is the modern way of doing CSS and can save many lines of code in your stylesheets. This is possible because Sass works with variables, nested syntax and mathematical operations.
In my opinion one of the nicest features of sass is the possibility to write a selector just once and put all styles for that inside it. Do you need a more specific selector under an existing one? Just nest the specifics into the generic one.

12 :: Tell us what are the advantages of using JavaScript?

You want a developer who really knows how to play to the strengths of your chosen platform. Some key advantages of JavaScript are listed below for your convenience.

☛ Lightweight: JavaScript can be executed within the user’s browser without having to communicate with the server, saving on bandwidth.
☛ Versatile: JavaScript supports multiple programming paradigms—object-oriented, imperative, and functional programming and can be used on both front-end and server-side technologies.
☛ Sleek Interactivity: Because tasks can be completed within the browser without communicating with the server, JavaScript can create a smooth “desktop-like” experience for the end user.
☛ Rich Interfaces: From drag-and-drop blocks to stylized sliders, there are numerous ways that JavaScript can be used to enhance a website’s UI/UX.
☛ Prototypal Inheritance: Objects can inherit from other objects, which makes JavaScript so simple, powerful, and great for dynamic applications.

13 :: What Is The Difference Between Null And Undefined?

null is an object with no value. undefined is a type.

typeof null; // "object"

typeof undefined; // "undefined"

14 :: Tell me how To Use A Function A Class?

function functionName(name) {
this.name = name;
}

// Creating an object

var functionName = new functionName("WTEN");
console.log(functionName.name); //WTEN

15 :: Do you know what Is A Float?

Floats are used to push elements to the left or right, so other elements wrap around it.

16 :: Tell us have You Ever Used A Css Preprocessor/precompiler? What Are The Benefits?

CSS preprocessors, such as SASS, have numerous benefits, such as variables and nesting.

17 :: Explain me the Difference Between Visibility:hidden; And Display:none;?

☛ Visibility:Hidden; - It is not visible but takes up it's original space.
☛ Display:None; - It is hidden and takes up absolutely no space as if it was never there.

18 :: What Is The Difference Between Form Get And Form Post?

Get:
With GET the form data is encoded into a URL by the browser. The form data is visible in the URL allowing it to be bookmarked and stored in web history. The form data is restricted to ASCII codes. Because URL lengths are limited there can be limitations on how much form data can be sent.

Post:
With POST all the name value pairs are submitted in the message body of the HTTP request which has no restrictions on the length of the string. The name value pairs cannot be seen in the web browser bar.

POST and GET correspond to different HTTP requests and they differ in how they are submitted. Since the data is encoded in differently, different decoding may be needed.

19 :: Explain me what are the benefits of Coffee Script over JavaScript?

☛ CoffeeScript allows you to express your program with a lot less code than JavaScript
☛ It has a lot of lightweight add-ons like Ruby string Interpolation and Python style list comprehension
☛ Makes everyday tasks easier to perform with CoffeScript rather than JavaScript

20 :: When would you use CSS clear?

When you want an element on the left or right of the floating element not to wrap around it, you can use clear.

21 :: Tell me are you a team player? Give an example of a time when you had to resolve a conflict with another member on your team?

There are many jobs associated with putting together an application, and chances are high that your new JavaScript developer will at the very least have to interface with a designer. You’re looking for a developer who can communicate effectively when they need to, responds to emails, and knows how to coordinate with other branches of a project.

22 :: Tell me the difference between classical inheritance and prototypal inheritance?

The great thing about JavaScript is the ability to do away with the rigid rules of classical inheritance and let objects inherit properties from other objects.

☛ Classical Inheritance: A constructor function instantiates an instance via the “new” keyword. This new instance inherits properties from a parent class.
☛ Prototypal Inheritance: An instance is created by cloning an existing object that serves as a prototype. This instance—often instantiated using a factory function or “Object.create()”—can benefit from selective inheritance from many different objects.

23 :: Tell me what can you do to improve page performance?

In a nutshell page performance is widely understood as the page load time from the users' perspective, so below are some steps that might improve a page's performance.

Use sprite images whenever possible, try to group small images commonly used in a single file to be requested just once. See how Google uses sprites in Google Maps to make one request instead of one for each small image. See a sprite from Google Maps

Javascripts should be at the bottom of the page, instead of in the head as we use to see out there;

Ensure parallel requests of your JS and CSS files. In order to force the browser to do that, you can optimize the order you include resources in your page. This item can generate its own blog post or even a book so I prefer to suggest you a really good reading about it.

Compress images whenever possible, it makes a difference;

Browser Caching is also very import to be set for static resources like JS and CSS files, images, PDFs and HTML. Caching is set in the HTTP header by informing browsers the expiry date or maximum age. Then browsers can load the last downloaded resource from the cache instead of request it again.

24 :: Tell us how variables differ in CoffeeScript than JavaScript?

For variables in JavaScript, you have to add semi-colon at the end of it to execute while in CoffeeScript there is no need to add Semi-colon at the end of the statement. Unlike, JavaScript, CoffeeScript adds up semi-colon with ease.

25 :: Tell me what Is The Difference Between A Host Object And A Native Object?

Native - existing in JavaScript. Host - existing in the environment.