Seneca Global IT Services
10+ ABResh Events Interview Questions and Answers
Q1. What is different web storages and Does Session storage available in other tab and new window?
Web storages include local storage, session storage, and cookies. Session storage is not available in other tabs or windows.
Local storage persists even after the browser is closed, while session storage is cleared when the session ends.
Cookies are used for storing small amounts of data that can be accessed by both the server and client.
Session storage is only available within the same tab or window where it was created.
Example: A user logs into a website and their login infor...read more
Q2. What is Polyfill and write polyfill for Array methods
Polyfill is a code that provides modern functionality on older browsers.
Polyfills are used to fill the gap between modern and older browsers.
They are written in JavaScript and provide functionality that is not natively supported by the browser.
Polyfills can be used for Array methods like forEach, map, filter, reduce, etc.
Here's an example of a polyfill for the Array.prototype.forEach method: Array.prototype.forEach = function(callback) { for (var i = 0; i < this.length; i++) ...read more
Q3. React how to reduce unnecessary re-renders
Use React.memo, useCallback, and shouldComponentUpdate to reduce unnecessary re-renders.
Use React.memo to memoize functional components and prevent re-renders when props don't change.
Use useCallback to memoize functions and prevent re-creation on every render.
Use shouldComponentUpdate to prevent class components from re-rendering unnecessarily.
Avoid using inline functions in render methods as they create new function instances on every render.
Use PureComponent instead of Comp...read more
Q4. What is Event Bubbling and Event Capturing
Event bubbling and capturing are two ways of propagating events in the DOM tree.
Event bubbling is the process of an event propagating from the innermost element to the outermost element in the DOM tree.
Event capturing is the opposite of event bubbling, where the event is captured at the outermost element and propagated to the innermost element.
Event listeners can be added to either the capturing or bubbling phase using the addEventListener method.
Event.stopPropagation() can b...read more
Q5. How to add a custom headers to an Axios calls
To add custom headers to an Axios call, use the headers property in the config object.
Create a config object with the headers property
Pass the config object as the second argument to the Axios call
Example: axios.get(url, { headers: { 'Authorization': 'Bearer token' } })
Q6. What is IndexDB and how to work with it?
IndexDB is a client-side storage system for web applications.
It allows storing data in key-value pairs.
It is an alternative to cookies and local storage.
It supports transactions for atomic operations.
It can store large amounts of structured data.
It can be accessed using JavaScript APIs.
Q7. Write a program to remove all the duplicates an array
Program to remove duplicates from an array
Create a new empty array
Loop through the original array and check if the element already exists in the new array
If not, add it to the new array
Return the new array
Q8. What are web sockets and how it works
Web sockets are a communication protocol that allows real-time bidirectional communication between a client and a server.
Web sockets use a persistent connection between the client and server
They allow for real-time data transfer without the need for constant HTTP requests
Web sockets are commonly used in chat applications, online gaming, and stock trading platforms
Q9. What is Prototype Inheritance
Prototype Inheritance is a way of creating objects based on existing objects.
It allows objects to inherit properties and methods from other objects.
It is a feature of object-oriented programming in JavaScript.
It helps in creating efficient and reusable code.
Example: A 'Car' object can inherit properties and methods from a 'Vehicle' object.
Q10. Write a python code to identify and arrange non zero and negative integers in a list
Python code to arrange non zero and negative integers in a list
Iterate through the list and separate non zero and negative integers
Sort the non zero and negative integers separately
Combine the sorted lists to get the final result
Q11. Explain about memory management
Memory management is the process of controlling and coordinating computer memory, assigning portions called blocks to various programs.
Memory management involves allocating memory to programs when needed and freeing up memory when no longer needed.
It helps prevent memory leaks and optimize memory usage.
Common memory management techniques include garbage collection, manual memory management, and automatic memory management.
Examples include malloc and free functions in C, and g...read more
Q12. Explain about UITableViews
UITableViews are a type of view in iOS development used to display data in a scrollable list format.
UITableViews are commonly used in iOS apps to display lists of data, such as contacts, messages, or settings.
They consist of rows and sections, with each row representing an item of data.
UITableViews can be customized with different cell types, styles, and layouts.
They support features like scrolling, selection, editing, and reordering of rows.
UITableViews are often populated w...read more
Q13. Explain Lazy variable
Lazy variable is a variable that is not evaluated until it is needed.
Lazy variables are used to defer the initialization of a variable until it is actually accessed or needed.
They can help improve performance by avoiding unnecessary computations.
Lazy variables are commonly used in functional programming languages like Swift and Kotlin.
Q14. Explain about cocoa pods
CocoaPods is a dependency manager for Swift and Objective-C projects.
CocoaPods is used to easily manage and install third-party libraries in iOS projects.
It uses a Podfile to specify project dependencies and automatically downloads and integrates them.
CocoaPods simplifies the process of adding and updating libraries in Xcode projects.
Example: 'pod 'Alamofire'' adds the Alamofire networking library to a project.
Q15. Explain about XCTest
XCTest is a testing framework provided by Apple for writing unit tests for Swift and Objective-C code.
XCTest is integrated into Xcode and allows for writing test methods within test classes.
Test methods are prefixed with the word 'test' and can be used to verify the behavior of code.
XCTest provides assertions like XCTAssert, XCTAssertTrue, XCTAssertFalse, XCTAssertEqual, etc. for validating test results.
Test cases can be organized into test suites and executed using Xcode's t...read more
Interview Process at ABResh Events
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month