FrontEnd Mock Test With Answers
FrontEnd Mock Test With Answers
Answer Key
📄 Mock Test for Front-End Developer Role
📌 Instructions: Mark the correct answers (for MCQs) and write short responses for
descriptive questions.
a) 3 ✅
Explanation: The spread operator creates a shallow copy. Pushing to b doesn't change a.
a) Number
b) Undefined
c) Float
d) Symbol
c) Float ✅
Explanation: JavaScript uses a single Number type for all numbers.
4. Q4. In TypeScript, what is the correct way to define a function that returns a number?
a) useProps()
b) useState()
c) useReducer()
d) useCallback()
b) useState() ✅
9. Q9. What is the main difference between React and React Native?
Explanation: React builds web apps; React Native builds native mobile apps using native
components.
a) React Router
b) NativeScript
c) react-navigation
d) jQuery Navigation
c) react-navigation ✅
a) @NgModule
b) @Injectable
c) @Component
d) @Directive
c) @Component ✅
12. Q12. What is the purpose of NgRx in Angular apps?
Explanation: NgRx is Angular’s Redux. It helps manage application state reactively using
Actions, Reducers, Effects.
a) routes.json
b) app.routes.ts
c) app-routing.module.ts
d) router.config.js
c) app-routing.module.ts ✅
Explanation: A pure function that returns new state based on current state and action.
17. Q17. What steps do you take to handle loading and error states in an API call?
Explanation: Use `loading` state, try/catch for error handling, show loader or error
messages.
a) em
b) %
c) px
d) rem
d) rem ✅
19. Q19. Describe how you resolve a Git merge conflict.
Explanation: Open conflicted files, manually resolve, `git add`, then commit and push.