Frontend Interview Questions [Top 250+]
To be a successful frontend developer, you need a combination of technical skills, problem-solving abilities, and a good understanding of user experience design. Here are some essential skills for frontend development:
- Proficient in HTML: Understanding the structure, semantics, and best practices of HTML is essential for creating well-structured and accessible web pages.
- Strong CSS Skills: CSS is used for styling and layout. You should be proficient in CSS fundamentals, including selectors, box model, positioning, responsive design, and CSS frameworks.
- JavaScript and Frameworks: JavaScript is a core language for frontend development. Familiarity with JavaScript and its libraries/frameworks like React, Angular, or Vue.js is crucial for building interactive and dynamic web applications.
- Responsive Design: Ability to create responsive layouts that adapt to different screen sizes and devices is essential for delivering a consistent and user-friendly experience across various platforms.
Front End Developer Interview Questions for Freshers
HTML Interview Questions For Freshers
- What are the new features of HTML5 ?
- What is the purpose of the doctype declaration in HTML5 ?
- What would happen if I would not declare doctype in html ?
- What are data attributes in HTML5 and how are they used ?
- What is the difference between HTML and HTML5 ?
- Difference between SVG and Canvas ?
- What is the difference between localstorage , session storage and cookies ?
- What are the void elements in HTML ?
- What is BOM (browser object model ) and what is the root object in it ?
- What are the various formatting tags in HTML ?
- In how many ways you can display HTML elements ?
- What is the difference between a tag and an attribute ?
- What are data attributes in HTML5 and how are they used ?
- What are different types of list in HTML ?
CSS Interview Questions For Freshers
- Explain CSS position properties ?
- What is the difference between display inline , display inline block and display block ?
- What are the different types of Selectors in CSS ?
- What are pseudo elements and pseudo classes ?
- What are new features in CSS3 ?
- What is the box model in CSS3 ?
- In how many ways can we add CSS to our HTML file?
JavaScript Interview Questions For Freshers
- What are the data types in JavaScript ?
- What is an object in JavaScript ?
- In how many ways we can define an object in JavaScript ?
- How to define a class in JavaScript ?
- What is defineProperty() method of javascript Object ?
- What is scope in JavaScript ?
- Explain variable hoisting ?
- Explain closures in javascript ?
- Difference between null and undefined ?
- Difference between == and === ?
- What are the new features in ES6 , which were not there in previous JavaScript version ?
- Explain time complexity ?
- What is space complexity ?
What will be the output of the below code: let obj ={ a: 10, vir : function(){ x(); console.log(this.a); function x(){ console.log(this.a) } } } obj.vir();
- What will be the output of the below code for (var i= 0; i < 5; i++){ setTimeout(() => console.log(i)); }
- What will be the output of the below code :- var a = 90; doit(); function doit(){ console.log(a); var a = 10; }
- Explain call(), bind() and apply() in JavaScript ?
- Advantage of using arrow functions ?
- What is webpack and babel ?
- How can we add an element at the start of a JavaScript array ?
- How to capitalise all the first letters of a given string ?
- What will be the output of below code snippet :-function x() {return 2}alert(x());function x() {return 3}
- What will be output of following code doit(); var doit = function (){ alert('x'); }
- Difference between pass by value and pass by reference ?
- What will be the output of following code:- for (var i= 0; i < 5; i++){ (function(i) { setTimeout( () => console.log(i)) })(i); }
- What is InstanceOf operator ?
- What is the use of constructor() in a class ?
- What will be the output of the following :
console.log(4.toString());
console.log(4.2.toString());
console.log(4*undefined); - How can we use javascript Set to remove duplicate elements of an array ?
- What is the data storage limit of a cookie ? and what is the maximum number of characters that can be stored in a cookie string ?
- How to make deep copy and shallow copy of objects ?
- What's the difference between for loop and for each loop ?
- What is a unary function ?
- What is JSON in javascript and what are its advantages ?
- What is JSON.stringify() ?
- What is JSON.parse() ?
Angular Interview Questions For Freshers
- What is a Single page application ?
- What is Angular and what are its key features ?
- What are the lifecycle hooks in an Angular component ?
- What is the difference between ng serve and npm start?
- What is the difference between ‘dependencies’ and ‘dev-dependencies’ properties in package.json ?
- What are the types of forms available in Angular ? Explain with syntax.
- How to implement routing in Angular ?
- What are the ways to share data between 2 components in Angular ?
Git Interview Questions For Freshers
- What is git and what are the most useful commands ?
- Why git is most popular ?
- Explain the difference between 'git pull' and 'git fetch' ?
- What command is used in git to change your working branch ?
- What is the difference between git and GitHub ?
- How do you rename a branch in Git ?
- Describe the purpose and functionality of the '.gitignore' file ?
- What things to be considered while reviewing a pull request ?
- What is the purpose of the 'git stash' command ?
- How do you resolve a merge conflict in Git ?
- What is the difference between Git's "merge" and "rebase" operations ?
Source:- Frontend Interview Questions For Freshers
Frontend Interview Questions For Experienced
HTML Interview Questions For Experienced
- What is the use of aria hidden attribute ?
- What are some important points related to accessibility ?
- For accessibility which screen reader is used for which browser ?
- What are web workers ?
- Which html elements were used before HTML5 for embedding video into the website ?
- What is an image map ?
- What does semantic HTML mean ?
- What are the new features of HTML5 ?
- Explain use of meta tags in HTML ?
- What is view state and session state ?
- What should be preferred for storing tokens localstorage or session storage or cookies and why ?
CSS Interview Questions For Experienced
- Difference between Display none and Visibility hidden ?
- What are the new features in CSS3 ?
- What is the difference between active and focus pseudo classes ?
- What is CSS box sizing property ?
- What is the box model in CSS ?
- What is the meaning of 1. div ~ p 2. div + p 3. Div > p in CSS ? important
- How do you create a responsive design using CSS3 ?
- How to align an element both vertically and horizontally at the center of it’s parent element ?
- How to animate in css ?
- How to create a half circle using css ?
- How to create a triangle using css ?
- What are the limitations of CSS ?
- How to create a carousel using css ?
- What is SCSS ?
- What are mixins in SCSS ?
- What are the benefits of using CSS preprocessors ?
- How can you implement responsive images ?
- Explain CSS flexbox with example ?
- In CSS flexbox how to to put a child div which is on 3rd position inside the parent to top inside the parent container ?
- What is the difference between CSS grid and CSS flexbox ?
- How to create a 9 square boxes with 3 rows and 3 columns using css ?
JavaScript Interview Questions For Experienced
- What is Callback hell ?
- Explain promises in JavaScript ?
- Difference between observable and a promise
- How to create custom events in JavaScript ?
- Difference between prototype and _proto_ ?
- Explain prototypal inheritance in JavaScript ?
Difference between for in and for of loop ?
- Difference between get and post methods ?
- Difference between post and put methods ?
- When we pass an object to a function are they passed by reference or by value ?
- What do u understand by the terms mutable and immutable in JavaScript ?
- What is Async and Await in JavaScript ?
- Is array a data type ?
- How can we overwrite any JavaScript inbuilt property (like array.push())
- Explain exception handling in JavaScript ?
- Difference between a transpiler and a compiler ?
- How to check if a number is an integer without using math function and without converting number into string or array ?
- Use of JavaScript clearInterval() ?
- How to define a private method or variable inside a class in JavaScript or ES6 ?
- Can arrow functions be used as constructor functions ?
- What is Map in JavaScript ?
- How to implement authentication in a website ?
- How would you implement pagination using JavaScript ?
- Difference between a browser tab and a window in context of localstorage and sessionstorage ?
- What is oauth in context of jwt ?
- What is nginx used for ?
- How to change the redirection URLs after the build has been made ?
- What is a JWT , what are it's parts and what is its use ?
- What are ‘set’ in javascript ?
- Do we have reverse() method on javascript string ?
- Name some array methods in JavaScript ?
- Which operation is faster among == and === ?
- Explain Array's sort method for sorting numbers. What is the time complexity of this method ?
- What is Micro frontend architecture ?
- What is the difference between first class function and higher order function ?
- What is temporal dead zone ?
- Difference between put and patch method in javascript ?
- How to convert an object to an Array in JavaScript ?
- What is memoization in JavaScript ?
- How to write a function ‘Sum’ such that on calling sum(a)(b)(c)....() where a,b,c etc are numbers , the output will be a+b+c+....(function calls with parameters) ?
- What are the design patterns in JavaScript ?
- What is event loop in JavaScript ?
- How to deep clone in JavaScript ?
- How to flatten an array in JavaScript ?
- What is debounce in JavaScript ?
- Write a code to flatten the contents of an object ?
- How to create virtual dom in JavaScript ?
- What is critical rendering path ?
- What is a freeze method in JavaScript ?
- What are solid principles in JavaScript ?
- What is the seal method in JavaScript ?
- Difference between Angular and React ?
- How to watch variable changes in JavaScript ?
- How to create a change detection mechanism of JavaScript framework ?
- What is functional programming in JavaScript ?
- What is the use of function currying in JavaScript ?
- What is quick sort and what is it’s time complexity ?
- Explain bubble sort and insertion sort with example ?
- What is a REST API ?
- How to apply conditional breakpoints in chrome browser debugging tool ?
- Why storing JWT in cookie is safer than storing JWT in session storage or local storage? Is storing in cookie 100 percent safe ? what if I copy JWT from cookie in the browser debug panel and use it in a CSRF attack ?
- What is an execution context and lexical environment in JavaScript ?
- What is generator function in JavaScript ?
- What are JavaScript iterators ?
Angular Interview Questions For Experienced
- What are the ways to share data between 2 components ?
- What is lazy loading in Angular ?
- What are custom directives in Angular and how to create them ?
- What is the difference between ng serve and npm start ?
- What is the difference between ng add and npm install ?
- Can we use jQuery in Angular 2/4/5 ?
- What is replay subject in angular ?
- What is the difference between adding styles and scripts in angular.json and adding styles and scripts in index.html ?
- What is the difference between cold observables and hot observables ?
- What are the properties inside @ngModule decorator ?
- How to generate a component using cli command without creating its spec file ?
- What is RxJS ?
- What is the use of HttpClientModule ?
- Is it necessary to define a constructor in a component ?
- What are the security features in angular ?
- What is testbed in Jasmine ?
- What is the difference between Subject and Behaviour Subject ?
- What are the advantage of using observable instead of promise for http request ?
- Difference between authorization and authentication. Explain the basic difference and also in the context of an angular application ?
- What is AOT in Angular ?
- How to create custom pipe in Angular ?
- What are inbuilt Angular pipes ?
- Explain Software version nomenclature (semantic versioning) ?
- What is the use of tilde(~) and caret(^) sign in package.json ?
- What are interceptors in Angular ?
- Can we rename dist folder in Angular Project ?
- How would the browser Know that your app is an Angular based app ?
- How to make multiple http calls in parallel in Angular ?
- What is a module in TypeScript, and how can you use it ?
- How to hit an API before the loading of the appComponent ?
- If there is a package(or say library) that is not available through NPM , then how would you use it in your angular application ?
- How to implement treeshaking in Angular ?
- What can be the values of 'providedIn' property of @injectable decorator ?
- How to optimize Angular application using OnPush change detection strategy ?
- Can event triggered in parent cause change detection in child with OnPush strategy in Angular ?
- Can event triggered in child cause change detection in parent with OnPush strategy in Angular ?
- What is the latest Angular version and what are the new features added in it ?
- What are the types of forms available in Angular ? Explain with syntax.
- What are dynamic forms and how to create them in Angular ?
- How to show error messages on form controls ?
- How to use a service only for a specific component instead of the whole module ?
- Can you put ngIf and ngFor on same element ?
- What's the difference between Observable and Subject ?
- How does ng serve work ?
- How to improve Angular app performance ?
- What is AuthGuard in Angular ?
- Explain the canActivateChild route guard ?
- What is the difference between Canload and canActivate route guards ?
- Explain switch map , mergemap , forkjoin, combineLatest, concatMap, exhaustMap . what would happen if any of the requests fails in switch map , merge map or forkjoin ?
- What is dependency injection ?
- What's the difference between debounce and setTimeout ?
- What are RxJS key features ?
- What is the difference between 'from' and 'of' operator in RxJS ?
- How do you handle errors in RxJS observables ?
- What is the purpose of operators in RxJS, and can you give an example of a common operator ?
- What are services in Angular ?
- What is the difference between AOT and JIT ?
- What are the different building blocks of Angular ?
- How do you use the retry() operator in RxJS, and what is its purpose ?
- What is Angular change detection and how does it work ?
- How to dynamically create form fields with FormArray in Angular ?
- How to optimize an Angular application ?
- Explain pure and impure pipe in Angular ?
- Explain unit testing in Angular ?
- How to test an Angular Service ?
- Explain ngAfterContentInit hooks ?
- Explain ngAfterViewInit hook with example ?
- Difference between ngAfterContentInit and ngAfterViewInit ?
- What is View Encapsulation in Angular ?
- What is the use of polyfills ?
- What is scan operator in RxJS ?
- How does spyOn work in Angular ?
- How to mock http request in Angular ?
- What is zone js in Angular ?
- What is ngZone in Angular ?
- What is reduce operator in RxJS ?
- What is the use of trackBy in Angular ?
Git Interview Questions For Experienced
- How do you remove a file from a Git repository ?
- How do you undo the last Git commit ?
- How do you view the Git commit history ?
- What is tagging in git ?
- What is rollback in git ?
- What is git bisect command ?
- What is the use of Reflog in git ?
- How does Git handle file conflicts when merging branches ?
- What are Git hooks, and how can they be used in a repository ?
- Explain the concept of "cherry picking" in Git and how it can be done ?
JavaScript Coding Interview Questions (Freshers/Experienced)
- Write a code to display which character is coming how many times in a given string ?
- Write a function to check whether a string is a palindrome or not with time complexity of the code ?
- Given an array containing some numbers write a code to that will find out the missing numbers in the array's range ?
- Write a code to reverse all the words of a given string. For example :
Input : “how are uoy”
Output : “Woh era you” - How to segregate 0s and 1s in an array in Javascript ?
- Write a function to check if an anagram of a string is palindrome or not ?
- Write a code to check if two strings are anagram of each other ?
- Write a code to group items of array by category ?
- How to get the maximum count of consecutive 1's in an array ?
- How do you write a factorial code in JavaScript ?
- Given an integer array, find the subarray with the largest sum, and return its sum ?
- How to merge two sorted arrays in JavaScript ?
- How do you check if a value is a prime number ?
- How to reverse a string in JavaScript using recursion ?
Frequently Asked Questions
For more questions and answers visit our website at frontend interview questions
Comments
Post a Comment