Gainsight interview experience Real time questions & tips from candidates to crack your interview

Frontend Developer

Gainsight
upvote
share-icon
2 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 5 months
Topics: HTML, CSS, Javascript, Angular,Web Development, Java
Tip
Tip

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application process
Where: Referral
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Interview rounds

01
Round
Medium
Video Call
Duration45 minutes
Interview date27 Apr 2021
Coding problem4

Technical round with questions on Javascript mainly.

1. JavaScript Question

What happens when you call a function with the new keyword?

Problem approach

When a function is called with the new keyword, couple of things happen behind the scenes:
A new empty object is created
The context object this is bound to the new empty object
The new object is linked to the function’s prototype property
this is automatically returned unless another value is returned explicitly from the function
This is the mechanism provided by JavaScript to link objects with prototype objects.

2. JavaScript Question

How can you import all exports of a file as an object in JavaScript?

Problem approach

To import all exported members of an object, one can use:
import * as object name from ‘./file.js.’
The exported methods or variables can be easily accessed by using the dot (.) operator.

3. JavaScript Question

What is the purpose of ‘This’ operator in JavaScript?

Problem approach

The JavaScript this keyword refers to the object it belongs to. This has different values depending on where it is used. In a method, this refers to the owner object and in a function, this refers to the global object.

4. JavaScript Question

What are arrow functions in Javascript?

Problem approach

ES6 arrow functions provide you with an alternative way to write a shorter syntax compared to the function expression.

The following example defines a function expression that returns the sum of two numbers : 

 

let add = function (x, y) {
	return x + y;
};
console.log(add(10, 20)); // 30

 

 

The following example is equivalent to the above add() function expression but use an arrow function instead :

 

let add = (x, y) => x + y;
console.log(add(10, 20)); // 30;

 

In this example, the arrow function has one expression x + y so it returns the result of the expression.

02
Round
Easy
Video Call
Duration45 minutes
Interview date27 Apr 2021
Coding problem3

Technical round with questions on Angular mainly.

1. Angular Question

What are lifecycle hooks in Angular? Explain a few lifecycle hooks.

Problem approach

Every component in Angular has a lifecycle, different phases it goes through from the time of creation to the time it's destroyed. Angular provides hooks to tap into these phases and trigger changes at specific phases in a lifecycle.

ngOnChanges( ) This hook/method is called before ngOnInit and whenever one or more input properties of the component changes. This method/hook receives a SimpleChanges object which contains the previous and current values of the property.

ngOnInit( ) This hook gets called once, after the ngOnChanges hook. It initializes the component and sets the input properties of the component.

ngDoCheck( ) It gets called after ngOnChanges and ngOnInit and is used to detect and act on changes that cannot be detected by Angular. We can implement our change detection algorithm in this hook. ngAfterContentInit( ) It gets called after the first ngDoCheck hook. This hook responds after the content gets projected inside the component.

ngAfterContentChecked( ) It gets called after ngAfterContentInit and every subsequent ngDoCheck. It responds after the projected content is checked.

2. Angular Question

What is AOT compilation?

Problem approach

Every Angular application consists of components and templates which the browser cannot understand. Therefore, all the Angular applications need to be compiled first before running inside the browser.

Angular provides two types of compilation:
JIT(Just-in-Time) compilation : In JIT compilation, the application compiles inside the browser during runtime.
AOT(Ahead-of-Time) compilation : Whereas in the AOT compilation, the application compiles during the build time.

3. Angular Question

How are observables different from promises?

Problem approach

The first difference is that an Observable is lazy whereas a Promise is eager.
Promise emits a single value. Observable emits multiple values over a period of time
Promises are Not Lazy. Observable is lazy. An observable is not called until we subscribe to the observable
Promise cannot be cancelled. Observable can be cancelled by using the unsubscribe() method

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
4 rounds | 8 problems
Interviewed by Amazon
8518 views
0 comments
0 upvotes
Analytics Consultant
3 rounds | 10 problems
Interviewed by ZS
907 views
0 comments
0 upvotes
company logo
SDE - Intern
1 rounds | 3 problems
Interviewed by Amazon
3320 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 6 problems
Interviewed by Expedia Group
2581 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Frontend Developer
3 rounds | 11 problems
Interviewed by Amdocs
2480 views
0 comments
0 upvotes