Tata Communications
Gallagher Interview Questions and Answers
Q1. What is position property in CSS3
Position property in CSS3 is used to set the position of an element relative to its parent or the viewport.
The position property can take values like static, relative, absolute, fixed, and sticky.
Static is the default value and elements are positioned according to the normal flow of the document.
Relative positions the element relative to its normal position.
Absolute positions the element relative to its nearest positioned ancestor.
Fixed positions the element relative to the v...read more
Q2. What is rxjs observables in nagular
Observables are a way to handle asynchronous data streams in Angular using RxJS library.
Observables are similar to promises but can handle multiple values over time.
They can be used for handling events, HTTP requests, and other asynchronous operations.
Operators can be used to transform, filter, and combine observables.
Subscriptions are used to listen to observables and receive data.
Example: fetching data from an API using observables and subscribing to the response.
Q3. What is Closure in JS
Closure is a function that has access to its parent scope even after the parent function has returned.
Closure allows for private variables and functions in JavaScript.
It is created when a function returns another function.
The inner function has access to the outer function's variables and parameters.
Example: function outer() { let x = 10; return function inner() { console.log(x); } }
Example: const innerFunc = outer(); innerFunc(); // Output: 10
Q4. What is Prototype in JS
Prototype is a property of an object that allows adding new properties and methods to an object.
Prototype is a blueprint for creating objects
It allows inheritance by sharing properties and methods between objects
Modifying the prototype affects all objects created from it
Prototype chain allows accessing properties and methods of parent objects
Example: Array.prototype includes() method
Q5. What is Pipe in Angular
Pipe is a feature in Angular that allows transforming data before displaying it in the view.
Pipes are used to format and manipulate data in Angular templates.
They can be used to filter, sort, and transform data.
Pipes can be chained together to perform multiple transformations.
Angular provides built-in pipes like DatePipe, CurrencyPipe, and LowerCasePipe.
Custom pipes can also be created to meet specific requirements.
Q6. What is event loop lifecycle
Event loop is a continuous process that runs in the background and handles all the events in the application.
Event loop continuously checks for new events in the event queue.
It processes each event one by one in a synchronous manner.
If an event takes too long to process, it can block the event loop and cause the application to freeze.
Event loop can be controlled using setTimeout(), setInterval(), and setImmediate() methods.
Node.js uses a single thread to handle all the events...read more
Q7. What is directive in angular
A directive is a component that adds behavior to an existing element or component in Angular.
Directives are used to manipulate the DOM, add event listeners, and create reusable components.
There are three types of directives in Angular: component, attribute, and structural.
Examples of built-in directives in Angular include ngIf, ngFor, and ngStyle.
Custom directives can be created using the @Directive decorator.
Q8. What is component in angular
A component in Angular is a reusable piece of UI that consists of HTML, CSS, and TypeScript code.
Components are the building blocks of Angular applications.
Each component has its own logic and view.
Components can be nested within other components.
Components can communicate with each other using @Input and @Output decorators.
Examples of components include a login form, a navigation menu, and a product list.
Q9. What is CSS3 flexbox
CSS3 flexbox is a layout module that provides a more efficient way to align and distribute space among items in a container.
Flexbox allows for flexible and responsive layouts without using floats or positioning.
It uses a parent container and child elements with flexible properties to create the layout.
Properties include justify-content, align-items, and flex-wrap.
Flexbox is supported by all modern browsers.
Example:
Item 1Item 2
More about working at Tata Communications
Top Full Stack Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month