Geekyants Software
Pantheon Interview Questions and Answers
Q1. What are the design patterns that you know and why do we use those?
Design patterns are reusable solutions to common software problems.
Creational patterns: Singleton, Factory, Abstract Factory, Builder
Structural patterns: Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy
Behavioral patterns: Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method, Visitor
We use design patterns to improve code readability, maintainability, and scalability.
They provide a common language...read more
Q2. What is currying in javascript?
Currying is a technique in functional programming where a function with multiple arguments is transformed into a sequence of nested functions, each taking a single argument.
Currying helps in creating reusable functions and partial application.
In JavaScript, currying can be achieved using closures and nested functions.
Example: const add = (a) => (b) => a + b; const add5 = add(5); console.log(add5(3)); // Output: 8
Q3. Explain promises in JS and async/await.
Promises in JS are objects representing the eventual completion or failure of an asynchronous operation. Async/await is a syntactic sugar for working with promises.
Promises are used to handle asynchronous operations in JavaScript.
They can be in one of three states: pending, fulfilled, or rejected.
Async/await is a modern way to work with asynchronous code in JavaScript, making it easier to read and write.
Async functions return a promise, allowing you to use the await keyword t...read more
Q4. what is currying in js
Currying is a technique in functional programming where a function with multiple arguments is transformed into a sequence of nested functions, each taking a single argument.
Currying helps in creating reusable functions and partial application.
In JavaScript, currying can be achieved using closures and nested functions.
Example: const add = (a) => (b) => a + b; const add5 = add(5); console.log(add5(3)); // Output: 8
Q5. Diff btw vite and webpack
Vite is a build tool that focuses on fast development, while Webpack is a more versatile and powerful build tool.
Vite is designed for fast development with instant server start and hot module replacement.
Webpack is a more versatile tool that can handle complex configurations and optimizations.
Vite uses ES modules natively for faster bundling, while Webpack requires additional plugins for the same functionality.
Vite is best suited for small to medium-sized projects, while Webp...read more
Q6. Diff btw webpack and vite
Webpack is a mature and feature-rich bundler, while Vite is a newer and faster build tool focused on development experience.
Webpack is a mature and feature-rich bundler that is highly configurable and widely used in the industry.
Vite is a newer build tool that focuses on providing a faster development experience by leveraging ES modules and server-side rendering.
Webpack requires a configuration file (webpack.config.js) to set up the build process, while Vite has zero-config s...read more
Q7. Closure in Javascript
Closure in JavaScript allows a function to access variables from its outer scope even after the outer function has finished executing.
Closure is created when a function is defined within another function and the inner function references variables from the outer function.
The inner function maintains a reference to the outer function's scope, allowing it to access those variables even after the outer function has returned.
Closures are commonly used in event handlers, callbacks...read more
Interview Process at Pantheon
Top Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month