Add office photos
Housing.com logo
Employer?
Claim Account for FREE

Housing.com

3.7
based on 548 Reviews
Video summary
Filter interviews by
Front end Engineer
Clear (1)

Housing.com Front end Engineer Interview Questions and Answers

Updated 5 Feb 2024

Q1. Pair Sum Problem Statement

You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to find and return a list of all pairs of elements where each sum of a pair equals 'S'.

Note:

Each pa...read more

Ans.

Find pairs of elements in an array that sum up to a given value, sorted in a specific order.

  • Iterate through the array and use a hashmap to store the difference between the target sum and each element.

  • Check if the difference exists in the hashmap, if so, add the pair to the result list.

  • Sort the result list based on the criteria mentioned in the question.

  • Return the sorted list of pairs.

Add your answer
right arrow
Q2. Can you explain the concepts of deep and shallow copy in JavaScript with examples?
Ans.

Deep copy creates a new copy of an object/array with all nested values copied, while shallow copy creates a new object/array with references to the original nested values.

  • Deep copy creates a completely new copy of an object/array, including all nested values, while shallow copy only creates a new object/array with references to the original nested values.

  • In JavaScript, deep copy can be achieved using methods like JSON.parse(JSON.stringify(obj)) or libraries like Lodash's _.cl...read more

Add your answer
right arrow
Q3. What is the difference between absolute and fixed positioning in CSS?
Ans.

Absolute positioning is relative to the nearest positioned ancestor, while fixed positioning is relative to the viewport.

  • Absolute positioning is relative to the nearest positioned ancestor.

  • Fixed positioning is relative to the viewport.

  • Absolute positioned elements are removed from the normal document flow.

  • Fixed positioned elements stay in the same position even when the page is scrolled.

Add your answer
right arrow
Q4. Can you write a polyfill for event delegation in JavaScript?
Ans.

Yes, event delegation can be achieved by attaching an event listener to a parent element and then checking the target element of the event.

  • Attach an event listener to a parent element that contains the child elements you want to delegate events to.

  • Check the target element of the event to determine if it matches the desired child element.

  • Perform the appropriate action based on the target element.

Add your answer
right arrow
Discover Housing.com interview dos and don'ts from real experiences
Q5. How does a browser render a webpage?
Ans.

A browser renders a webpage by parsing HTML, CSS, and JavaScript, constructing the DOM tree, rendering the layout, and painting the pixels on the screen.

  • Browser requests the HTML file from the server

  • Browser parses the HTML and constructs the DOM tree

  • Browser fetches external resources like CSS and JavaScript files

  • Browser applies CSS styles to the DOM elements and constructs the render tree

  • Browser executes JavaScript code and updates the DOM accordingly

  • Browser calculates the la...read more

Add your answer
right arrow
Q6. What are closures in JavaScript?
Ans.

Closures in JavaScript are functions that have access to variables from their outer scope even after the outer function has finished executing.

  • Closures allow functions to access variables from their parent function's scope

  • They are created whenever a function is defined within another function

  • Closures can be used to create private variables and functions in JavaScript

Add your answer
right arrow
Q7. What is webpack?
Ans.

Webpack is a module bundler for JavaScript applications.

  • Webpack takes modules with dependencies and generates static assets representing those modules.

  • It can handle various types of assets like JavaScript, CSS, and images.

  • Webpack allows for code splitting, lazy loading, and hot module replacement.

  • Common configuration options include entry, output, loaders, and plugins.

Add your answer
right arrow

More about working at Housing.com

Back
Awards Leaf
AmbitionBox Logo
#8 Best Tech Startup - 2022
Awards Leaf
Contribute & help others!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories
Recently Viewed
INTERVIEWS
ServiceNow
No Interviews
INTERVIEWS
Housing.com
No Interviews
SALARIES
BookMyShow
INTERVIEWS
Rational Business Corporation
No Interviews
SALARIES
NoBroker
SALARIES
99acres
COMPANY BENEFITS
Carwale
No Benefits
INTERVIEWS
Food Hub Software Solutions
No Interviews
INTERVIEWS
Jashanmal National Company
No Interviews
INTERVIEWS
GETIT Infoservices
No Interviews
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter