Skip to content

NarendraKoya999/Frontend-Machine-Coding-Interview-Questions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 

Repository files navigation

Machine Coding🧠 Round Questions-Frontend🎯

HTML and CSS

  1. Build a Basic HTML Page: Create a basic HTML page that includes a header, navigation menu, main content section, and a footer.

  2. Responsive Navigation Menu: Implement a responsive navigation menu that collapses into a hamburger menu on smaller screens using HTML, CSS, and JavaScript/jQuery.

  3. JavaScript Calculator: Build a simple calculator using HTML, CSS, and JavaScript that can perform basic arithmetic operations (addition, subtraction, multiplication, division).

  4. Image Carousel: Create an image carousel/slider using HTML, CSS, and JavaScript/jQuery that allows users to navigate through a set of images with next and previous buttons.

  5. To-Do List Application: Develop a to-do list web application using HTML, CSS, and JavaScript. Users should be able to add, edit, and delete tasks.

  6. Responsive Design: Take an existing web page and make it responsive for various screen sizes (e.g., desktop, tablet, mobile) using media queries and CSS.

  7. Fetch API: Use the Fetch API to retrieve data from a JSON endpoint and display it on a web page using JavaScript.

  8. Single Page Application (SPA): Build a simple single-page application (SPA) using a frontend framework of your choice (e.g., React, Angular, Vue.js). Create multiple views and navigate between them.

  9. Form Validation: Implement client-side form validation for a registration form using HTML5 and JavaScript. Validate fields like email, password strength, and required fields.

  10. Implement a Drag and Drop Feature: Create a web page with a drag-and-drop interface using HTML, CSS, and JavaScript. Allow users to drag elements and drop them into designated areas.

  11. Infinite Scroll: Implement an infinite scroll feature on a web page. Load additional content as the user scrolls down the page using JavaScript and AJAX.

  12. Interactive Map: Build an interactive map using a mapping library (e.g., Leaflet, Google Maps API) and allow users to search for locations, add markers, and display additional information when clicking on markers.

  13. Web Accessibility: Ensure that a web page complies with web accessibility standards (WCAG). Make necessary HTML and CSS modifications to improve accessibility for users with disabilities.

  14. CSS Animation: Create a CSS animation, such as a spinning loader or a fading effect, to enhance user experience on a webpage.

  15. Responsive Email Template: Design and code a responsive email template that looks good on both desktop and mobile email clients.

  16. Dynamic Content Filtering: Create a web page that allows users to filter content dynamically based on categories or tags using JavaScript.

  17. Social Media Sharing Buttons: Implement social media sharing buttons (e.g., Facebook, Twitter) on a webpage. When a user clicks a button, a share dialog should appear.

  18. Image Lazy Loading: Implement image lazy loading to improve page performance. Images should only load when they are in the viewport.

  19. Form Autocomplete: Add autocomplete functionality to a search input field using JavaScript. Provide suggestions as the user types.

  20. Implement a Lightbox: Create a lightbox/modal window that displays images or content when a user clicks on a thumbnail or a button.

Intermediate Frontend Development

  1. Real-time Chat Application: Build a real-time chat application using a frontend framework (e.g., React, Vue.js) and a backend technology like WebSocket or Firebase.

  2. Responsive Tables: Make HTML tables responsive. Ensure that tables adapt to different screen sizes without horizontal scrolling.

  3. Data Visualization: Create a data visualization chart (e.g., bar chart, pie chart) using a JavaScript library like D3.js or Chart.js.

  4. Sticky Navigation: Implement a sticky navigation bar that sticks to the top of the page when scrolling down and returns to its original position when scrolling up.

  5. Web Performance Optimization: Optimize the performance of a slow-loading webpage. Identify bottlenecks and apply optimizations to reduce load times.

  6. Progressive Web App (PWA): Convert a web application into a Progressive Web App. Add features like offline access and push notifications.

  7. Unit Testing: Write unit tests for a JavaScript function or component using a testing framework like Jest.

  8. Cross-browser Compatibility: Ensure that a webpage works correctly and looks consistent across different web browsers (e.g., Chrome, Firefox, Edge).

  9. Web Security: Identify and fix security vulnerabilities in a web application, such as Cross-Site Scripting (XSS) or Cross-Site Request Forgery (CSRF).

  10. Responsive Email Signature: Design and code a responsive email signature that can be used in email clients.

  11. Infinite Carousel: Create an infinite carousel/slider that automatically loops through a set of images or content, providing navigation controls for the user.

  12. Image Gallery: Build an image gallery where users can view a collection of images, click to enlarge, and navigate through them using previous and next buttons.

  13. Tooltip Component: Design and implement a reusable tooltip component in HTML, CSS, and JavaScript/jQuery that appears when hovering over specific elements.

  14. Data Fetch and Display: Fetch data from a public API (e.g., GitHub API, OpenWeatherMap API) and display it on a webpage using JavaScript. Format and style the data appropriately.

  15. Animated Dropdown Menu: Create a dropdown menu that expands and collapses with smooth animations when the user hovers over a trigger element.

  16. Interactive Forms: Enhance a web form with interactive features like auto-suggestions, input validation, and conditional form fields using JavaScript.

  17. Page Transitions: Implement smooth page transitions between different sections or pages of a website using CSS transitions and JavaScript.

  18. Keyboard Shortcuts: Add keyboard shortcuts to a web application to improve user accessibility and navigation.

  19. Dark Mode Toggle: Create a dark mode toggle button that switches the website's color scheme between light and dark mode.

  20. WebGL Experiment: Develop an interactive WebGL project, such as a 3D visualization or animation, and embed it into a webpage.

  21. Custom Video Player: Build a custom HTML5 video player with custom controls, such as play, pause, volume, and progress bar.

  22. Page Printing Styles: Define CSS styles for printing a web page so that it looks well-formatted when printed on paper.

  23. Implement a Photo Gallery: Create a photo gallery with albums, thumbnails, and the ability to view images in a larger size.

  24. Web Audio Player: Build a web-based audio player with features like play, pause, volume control, and playlist support.

  25. SVG Animation: Animate SVG graphics using CSS or JavaScript to create eye-catching visual effects.

  26. Custom CSS Framework: Develop a custom CSS framework with pre-designed components and styles for rapid front-end development.

  27. Web Animation Framework: Create a JavaScript animation framework that simplifies the process of animating elements on a webpage.

  28. Augmented Reality Web App: Develop an augmented reality (AR) web application that overlays digital content on the user's real-world view using WebXR or similar technology.

  29. Progressive Image Loading Placeholder: Implement a progressive image loading technique that displays a blurred or low-quality image as a placeholder while the high-quality image loads.

  30. Automated Web Testing: Write automated tests for a web application using testing frameworks like Selenium or Cypress.

Expert Frontend Development (Part 1)

  1. Custom Web Animation Library: Create a small JavaScript library for animating elements on a webpage, including support for various easing functions.

  2. Custom UI Components: Create custom UI components, such as a modal dialog, date picker, or autocomplete, from scratch using HTML, CSS, and JavaScript.

  3. Mobile-First Development: Develop a webpage following the mobile-first approach, ensuring it looks and functions well on mobile devices and scales up to larger screens.

  4. Third-Party API Integration: Integrate with a third-party API (e.g., Google Maps, Twitter, YouTube) and display data or content from that API on your webpage.

  5. Offline Support: Implement offline support for a web application, allowing users to access content even when they have no internet connection.

  6. Browser History API: Use the Browser History API to implement client-side routing in a single-page application (SPA).

  7. Infinite Scroll with Pagination: Combine infinite scrolling with pagination to load and display content efficiently while allowing users to navigate through pages of data.

  8. Web Audio Player: Build a web-based audio player with features like play, pause, volume control, and playlist support.

  9. WebGL Experiment: Develop an interactive WebGL project, such as a 3D visualization or animation, and embed it into a webpage.

  10. Lazy-Loaded Modules: Implement lazy-loading for modules in a frontend framework (e.g., React, Angular, Vue.js) to reduce the initial bundle size.

  11. SVG Icon Library: Create a reusable SVG icon library with a search and usage feature for easy integration into web projects.

  12. WebGL 3D Scene: Develop a 3D scene using WebGL, including 3D models, textures, and interactive elements.

  13. Lazy-Loaded Images: Implement lazy-loaded images that load only when they come into the user's viewport, improving page loading performance.

  14. Web Performance Monitoring: Implement web performance monitoring and analytics to track and analyze website performance over time.

  15. Web Security Audit: Perform a security audit on a web application and identify vulnerabilities like SQL injection, XSS, and CSRF. Suggest and implement fixes.

  16. Server-Side Rendering (SSR) with React: Set up server-side rendering (SSR) for a React application.

  17. WebGL Shader Effects: Build a WebGL-based shader effect, such as a water ripple effect or a dynamic particle system.

  18. Lazy-Loaded Images: Implement lazy-loaded images that load only when they come into the user's viewport, improving page loading performance.

  19. Web Performance Monitoring: Implement web performance monitoring and analytics to track and analyze website performance over time.

  20. Web Security Audit: Perform a security audit on a web application and identify vulnerabilities like SQL injection, XSS, and CSRF. Suggest and implement fixes.

  21. Server-Side Rendering (SSR): Implement server-side rendering for a frontend framework (e.g., React, Angular) to improve initial page load performance.

  22. WebGL Shader Effects: Build a WebGL-based shader effect, such as a water ripple effect or a dynamic particle system.

  23. Virtual DOM Implementation: Implement a simplified virtual DOM (similar to React's virtual DOM) in JavaScript.

  24. Progressive Image Loading: Develop an image loading technique that progressively loads images, starting with low-quality placeholders and improving to high-quality images.

  25. Touch and Gesture Events: Implement touch and gesture events in a web application to provide touch-based interactions on mobile devices.

  26. Browser Storage Management: Build a utility for managing browser storage (localStorage, sessionStorage) and provide methods for setting, getting, and removing data.

  27. Web Worker: Use a web worker to offload computationally intensive tasks from the main thread, improving performance.

  28. Custom UI Components: Create custom UI components, such as a modal dialog, date picker, or autocomplete, from scratch using HTML, CSS, and JavaScript/jQuery.

  29. Mobile-First Development: Develop a webpage following the mobile-first approach, ensuring it looks and functions well on mobile devices and scales up to larger screens.

  30. Third-Party API Integration: Integrate with a third-party API (e.g., Google Maps, Twitter, YouTube) and display data or content from that API on your webpage.

  31. Offline Support: Implement offline support for a web application, allowing users to access content even when they have no internet connection.

  32. Browser Storage Encryption: Implement encryption for data stored in browser storage (e.g., localStorage) to enhance security.

  33. WebGL Particle Animation: Create a particle animation using WebGL, simulating effects like fire, rain, or fireworks.

  34. WebGL Data Visualization: Develop a data visualization using WebGL to represent complex datasets in an interactive 3D format.

  35. Custom Drag and Drop: Create a custom drag-and-drop functionality for elements on a webpage without relying on external libraries.

  36. Server-Side Rendering (SSR): Implement server-side rendering for a frontend framework (e.g., React, Angular) to improve initial page load performance.

  37. WebGL Shader Effects: Build a WebGL-based shader effect, such as a water ripple effect or a dynamic particle system.

  38. Virtual DOM Implementation: Implement a simplified virtual DOM (similar to React's virtual DOM) in JavaScript.

  39. Progressive Image Loading: Develop an image loading technique that progressively loads images, starting with low-quality placeholders and improving to high-quality images.

  40. Touch and Gesture Events: Implement touch and gesture events in a web application to provide touch-based interactions on mobile devices.

  41. Browser Storage Management: Build a utility for managing browser storage (localStorage, sessionStorage) and provide methods for setting, getting, and removing data.

  42. Web Worker: Use a web worker to offload computationally intensive tasks from the main thread, improving performance.

  43. Browser Storage Encryption: Implement encryption for data stored in browser storage (e.g., localStorage) to enhance security.

  44. WebGL Particle Animation: Create a particle animation using WebGL, simulating effects like fire, rain, or fireworks.

  45. WebGL Data Visualization: Develop a data visualization using WebGL to represent complex datasets in an interactive 3D format.

  46. Custom Drag and Drop: Create a custom drag-and-drop functionality for elements on a webpage without relying on external libraries.

React

  1. React Component: Create a simple React component (e.g., a button or a card) and render it on a webpage.

  2. State Management: Build a React component that manages and displays state, such as a counter that increments when a button is clicked.

  3. Props and PropTypes: Create a React component that accepts props and uses PropTypes to define and validate the expected props.

  4. Conditional Rendering: Implement conditional rendering in a React component based on a condition like user authentication.

  5. Handling Events: Add event handlers to React components (e.g., onClick, onChange) to make them interactive.

  6. Component Lifecycle: Utilize component lifecycle methods (e.g., componentDidMount, componentDidUpdate) in a React component.

  7. Forms in React: Create a form in a React component and manage its state as users input data.

  8. React Router: Set up routing in a React application using React Router, with multiple routes and navigation.

  9. API Data Fetching: Fetch data from an API in a React component and display it.

  10. Context API: Use React's Context API to manage and share state or data across multiple components.

  11. Redux Setup: Set up a Redux store, actions, and reducers in a React application.

  12. Redux State Management: Implement state management with Redux, connecting React components to the Redux store.

  13. Redux Middleware: Use Redux middleware (e.g., Thunk) to handle asynchronous actions in a Redux-powered React application.

  14. Authentication Flow: Implement user authentication and authorization in a React application, including login and protected routes.

  15. React Hooks: Rewrite class-based React components into functional components using hooks like useState and useEffect.

  16. Redux Saga: Integrate Redux Saga for handling side effects (e.g., API calls) in a Redux-based React application.

  17. React Higher-Order Components (HOCs): Create a higher-order component (HOC) to add functionality to existing React components.

  18. Error Handling: Implement error handling and display error messages in a React application.

  19. Optimizing Performance: Optimize the performance of a React application by reducing unnecessary renders and using memoization.

  20. Unit Testing with React Testing Library: Write unit tests for React components using React Testing Library and Jest.

  21. Server-Side Rendering (SSR) with React: Set up server-side rendering (SSR) for a React application.

  22. Progressive Web App (PWA) with React: Convert a React application into a Progressive Web App with offline support.

  23. Internationalization (i18n): Implement internationalization and localization in a React application.

  24. React Animation: Add animations and transitions to React components using libraries like React Spring or Framer Motion.

  25. Data Pagination: Implement data pagination in a React application, fetching and displaying data in chunks.

  26. Real-time Updates: Enable real-time updates in a React application using WebSocket or a similar technology.

  27. Authentication with OAuth: Implement OAuth-based authentication (e.g., OAuth 2.0) in a React application.

  28. Testing React Hooks: Write unit tests for custom React hooks using React Testing Library and Jest.

  29. Custom React Router: Build a custom router using React Router's low-level APIs to gain a deeper understanding of routing.

Redux

  1. Redux Store: Create a Redux store and define actions and reducers to manage state.

  2. Redux Actions and Reducers: Implement Redux actions and reducers to handle specific features or data in a Redux store.

  3. Redux Middleware: Add custom middleware to a Redux store to intercept and modify actions.

  4. Redux Thunk: Use Redux Thunk middleware to handle asynchronous actions in a Redux store.

  5. Redux Saga: Set up Redux Saga to manage side effects, such as API calls, in a Redux-powered application.

  6. Redux State Normalization: Normalize the shape of the Redux store to efficiently manage relational data.

  7. Redux Selector Functions: Create selector functions in a Redux application to efficiently retrieve and compute the derived state.

  8. Redux Immutable State: Ensure that the Redux store's state remains immutable to prevent unintended mutations.

  9. Redux Persistence: Implement state persistence in a Redux application, allowing the state to be saved and restored across sessions.

  10. Redux Testing: Write unit tests for Redux actions, reducers, and selectors using testing libraries like Jest.

  11. Redux Middleware Testing: Test Redux middleware, such as Thunk or Saga, to ensure correct behavior.

  12. Redux DevTools: Integrate and use Redux DevTools to inspect and debug the Redux store.

  13. Redux Integration with React: Connect a React application to a Redux store, dispatch actions, and map state to props.

  14. Redux Integration with Angular: Integrate Redux with an Angular application using libraries like NgRx.

  15. Redux Integration with Vue.js: Integrate Redux with a Vue.js application using libraries like Vuex.

Angular

  1. Angular Component: Create a simple Angular component and display it in a template.

  2. Angular Template Syntax: Use Angular's template syntax to render dynamic content and data.

  3. Angular Two-Way Binding: Implement two-way data binding in Angular to synchronize data between a component and its template.

  4. Angular Directives: Use built-in and custom Angular directives to manipulate the DOM and control rendering.

  5. Angular Services: Create and use Angular services to share data and logic across components.

  6. Angular Dependency Injection: Apply dependency injection in Angular to inject services into components.

  7. Angular Routing: Set up routing in an Angular application with multiple views and navigation.

  8. Angular Forms: Build forms in Angular, including template-driven and reactive forms.

  9. HTTP Requests in Angular: Make HTTP requests to retrieve data from an API in an Angular application.

  10. Angular Observables: Use observables and the RxJS library to work with asynchronous data in Angular.

  11. Angular Pipes: Create custom pipes in Angular to transform and format data in templates.

  12. Angular Directives: Develop custom Angular directives to add behavior and interactivity to elements.

  13. Angular Modules: Organize an Angular application into feature modules to improve maintainability.

  14. Angular Animation: Implement animations and transitions in Angular components using Angular's animation features.

  15. Unit Testing in Angular: Write unit tests for Angular components, services, and pipes using testing frameworks like Jasmine and Karma.

  16. End-to-End Testing in Angular: Perform end-to-end (E2E) testing of an Angular application using tools like Protractor.

  17. Angular Routing Guards: Create routing guards in Angular to control access to routes based on conditions like authentication.

  18. Angular Interceptors: Implement interceptors in Angular to add global error handling, logging, or authentication to HTTP requests.

  19. Server-Side Rendering (SSR) with Angular: Set up server-side rendering (SSR) for an Angular application.

  20. Angular Internationalization (i18n): Implement internationalization and localization in an Angular application.

  21. Angular Lazy Loading: Optimize an Angular application by lazy-loading feature modules.

  22. Angular Custom Forms: Create custom form controls and validators in Angular for complex form scenarios.

  23. Angular Testing Best Practices: Apply best practices for testing Angular applications, including component testing and mocking dependencies.

  24. Angular Material: Integrate and use Angular Material components and styles in an Angular application.

  25. Angular State Management: Implement state management in an Angular application using libraries like NgRx.

Vue.js

  1. Vue.js Instance: Create a Vue.js instance and render data in a template.

  2. Vue.js Data Binding: Implement data binding in Vue.js to update the UI based on changes in data.

  3. Vue.js Directives: Use Vue.js directives to manipulate the DOM and add behavior to templates.

  4. Vue.js Components: Create Vue.js components and pass data between parent and child components.

  5. Vue.js Event Handling: Handle user events in Vue.js components and trigger actions.

  6. Vue.js Forms: Build forms in Vue.js and manage form data using directives and methods.

  7. Vue.js Routing: Set up routing in a Vue.js application with multiple views and navigation.

  8. Vue.js State Management: Manage application state in Vue.js using Vuex.

  9. Vue.js HTTP Requests: Make HTTP requests to fetch data from an API in a Vue.js application.

  10. Vue.js Lifecycle Hooks: Utilize Vue.js lifecycle hooks to perform actions at different stages of a component's lifecycle.

  11. Vue.js Custom Directives: Create custom directives in Vue.js to extend functionality.

  12. Vue.js Filters: Define and use custom filters in Vue.js to format and transform data in templates.

  13. Vue.js Transitions and Animations: Add transitions and animations to Vue.js components for smooth UI effects.

  14. Vue.js Unit Testing: Write unit tests for Vue.js components using testing libraries like Jest.

  15. Vue.js End-to-End Testing: Perform end-to-end (E2E) testing of a Vue.js application using tools like Cypress.

  16. Vue.js Routing Guards: Create routing guards in Vue.js to control access to routes based on conditions like authentication.

  17. Vue.js Server-Side Rendering (SSR): Set up server-side rendering (SSR) for a Vue.js application.

  18. Vue.js Internationalization (i18n): Implement internationalization and localization in a Vue.js application.

  19. Vue.js Lazy Loading: Optimize a Vue.js application by lazy-loading components and routes.

  20. Vue.js Composition API: Develop components using the Vue.js Composition API for more flexible and reusable code.

  21. Vue.js Custom Directives: Create custom directives in Vue.js to extend functionality.

  22. Vue.js Filters: Define and use custom filters in Vue.js to format and transform data in templates.

  23. Vue.js Transitions and Animations: Add transitions and animations to Vue.js components for smooth UI effects.

  24. Vue.js Unit Testing: Write unit tests for Vue.js components using testing libraries like Jest.

  25. Vue.js End-to-End Testing: Perform end-to-end (E2E) testing of a Vue.js application using tools like Cypress.

  26. Vue.js Routing Guards: Create routing guards in Vue.js to control access to routes based on conditions like authentication.

  27. Vue.js Server-Side Rendering (SSR): Set up server-side rendering (SSR) for a Vue.js application.

  28. Vue.js Internationalization (i18n): Implement internationalization and localization in a Vue.js application.

  29. Vue.js Lazy Loading: Optimize a Vue.js application by lazy-loading components and routes.

  30. Vue.js Composition API: Develop components using the Vue.js Composition API for more flexible and reusable code.