0% found this document useful (0 votes)
19 views

Interview Questions of Js, React and Rest API Database

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Interview Questions of Js, React and Rest API Database

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

JavaScript

1. What is the "this" keyword?


2. What are Promises in JS?
3. What is the purpose of promises?
4. What is callback hell?
5. What is async/awaits?
6. What are closures?
7. What is “lexical scope”?
8. What is hoisting?
9. Does hoisting work on values described with const?
10. What is “event loop”?
11. How is an async task managed in an event loop?
12. Different usage of bracket notation and dot notation for accessing members of an object?
13. Difference between spread and rest operators?
14. Difference between arrow functions and normal functions?
15. Difference between pass by value and pass by reference?
16. What is used in JS from the former two?
17. What are arrow functions?
18. What is closure?
19. What are primitive and non primitive data types?
20. What is rest and spread in JavaScript?
21. Give examples of closure?
22. Will const and let keyword hoist?
23. Is JS single threaded or multi threaded?
24. How does js handle async code?
25. When we use .then and async await.
26. How does async JavaScript work?
27. What is callback hell?
28. What is JSX?
29. What is async/awaits?
30. Difference between arrow functions and normal functions?
31. How does js work?
32. How does js work in browser and on server
33. How to store sessions in browser
34. Anonymous function in JS?
35. Can we perform inheritance in JS?
36. Let, var and const in JS
37. Can we implement composition concepts in OOP languages like java?
38. We have one anonymous function we want its variable to restrict to function scope. What will we do?
39. What are JS scopes?
40. How to copy objects? How to shallow copy and deep copy?
41. Why let variables are not hoisted?
42. Synchronous vs Asynchronous
43. Is js immutable?
44. How to reference an array without being able to mutate it?
45. Difference in copying by reference or copying by value?
46. How to remove an element at a certain index of the array?
47. Difference between the output of a variable copied by reference where the original object is a struct
and a class.
48. Find the length of similar characters in two strings.
49. Write code for this to work. console.log(2)(3)(4) // output 24
50. A String Where You've To Replace All Dots With Dots Space And Next Character Would Be Capital
51. Find the product of even numbers from an array. Do it using reduce, filter, or map functions as well.
52. Find an even number without using the modulus operator.
53. Find unique elements in an array using js

54. Given an array of IDs, get the details against each ID through an API(using async await)
55. Given an array of objects, use reduce() to find the sum of all marks.
56. Use filter() to filter that array based on a condition.
57. Find max occurrences of 1's between 0's
58. Given an array, iterate through each element in the array using different ways

Another good resource:


https://medium.com/@nupoor_neha/javascript-front-end-interview-questions-1cbc5e32792b

REST API/ Databases


1. What are microservices?
2. Did you use REST in your project?
3. What is REST?
4. How do you handle sessions and authentication in Restful API if it is stateless.
5. What is a noSql DB?
6. Why did you use MongoDB?
7. Did you use ORM or not?
8. Did you use microservices or serverless architecture in your project?
9. What HTTP requests are being sent to authorize users using the login button. Explain the
process.
10. What would you do differently if you were given another 8 weeks to work on the same project?
11. What is http?
12. What is client server architecture?
13. What is a RESTful API?
14. How to store tokens on the web app?
15. Explain some authentication methods?
16. How does JWT work?
17. Difference between authentication and authorization.
18. What is caching and how it can be done in the database.
19. Is http stateless?
20. How to maintain state with http.
21. What is indexing in DB.
22. Difference between GET and POST.
23. What http method will be used for login?
24. Indexes Uses Which Data Structure?
25. What if we delete all get requests?
26. What happens when a user enters a url and hits enter?
27. Can we do everything using POST if we delete GET, what problems can we face?
28. If I want to send a request on mount in a component, where will i write it?
29. If we write www.google.com, and hit enter, what is happening on the backend? ip and everything.
Till the page is rendered.
30. Explain SQL vs noSQL?
31. When to use which?
32. What are indexes?
33. How does Indexing work?
34. Explain the procedure from a request to response?
35. How do you handle sessions and authentication in Restful api if it is stateless?
36. How do you handle JWS on the frontend because it will be removed when the page is refreshed?
37. What happens if we use post request instead of get request.
38. Which data structures does indexing use?
39. Can a user retrieve data from an api without using the get method (using POST)?
40. TCP vs UDP
41. Which address identifies devices
42. Which address identifies network
43. Is UDP stateful or can we make protocol stateful with UDP?
44. Processes are identified by?
45. How google translate url, Cookies, local storage.
46. Given two tables containing the same id (one as pk and other as fk) create a table with left join
47. Given two tables, what will be the output of left outer join A join B
48. What will be the cross join of A and B
49. Person P = new Person()
p.Name = Bill
Person p2 = p
P2.Name = Sam
What will be the value of p.name and p2.name if a person was a class and if it was a structure.

REACT
1. Difference between functional components and class components in react?
2. Why did you use functional components?
3. Did you have a styling component in React?
4. What is JSX
5. What is a component?
6. Difference between class based and functional based component?
7. What are hooks?
8. Can we replicate all the lifecycle methods using hooks?
9. benefit of one over the other?
10. What are props?
11. What is prop drilling?
12. What are controlled components?
13. What are the causes of re-rendering?
14. What are pure components?
15. What is state management?
16. What method is used to update a state?
17. What are stateless components?
18. What are stateful components?
19. What are the drawbacks of passing the index of an array as a "key" prop to a component?
20. What are refs?
21. Where does ref refer to an element?
22. What is reconciliation?
23. How is routing done in react?
24. Are there any other libraries?
25. Can we write our own router instead of using libraries?
26. How is form handling done in react?
27. Have you used context API?
28. What is redux?
29. Can we do a life cycle method in functional components?
30. What is context Api?( If u have used it before or in Skipq)
31. Why does it use state return?
32. If I write state=10 instead of setstate(10). What problem will occur?
33. What is state management?
34. If I create a class and constructor and no state variable. Will it start managing?
35. Virtual dom and Real dom. And what data structure virtual and real dom uses.
36. Explain working of react.
37. What are routers in react?
38. What is the purpose of key attributes in lists (react)?
39. What are the pros and cons of react?
40. How is virtual dom faster than real dom?
41. How is JSX compiled into javascript?
42. What are lists?
43. What are keys in lists?
44. Why assigning incremental values like, array index, to key is bad?
45. What is context api?
46. Which components would change if the value of context changes?
47. What are functional components?
48. What are class-based components?
49. What is the difference between them?
50. React keys and why are they important?
51. What would you prefer more? Frontend or backend?
52. useEffect hook?
53. Where does ref refer to an element?
54. What are stateless components?
55. What are the causes of re-rendering?
56. Where are useeffect hooks used?
57. What are props?
58. How to resolve the props drilling issue?
59. What is the react cycle.?
60. What are higher order components?
61. What is the use of useRef?
62. If you change something in the child component, when does that affect the parent component?
63. If you change something in the parent component will it have any effect on children components?
64. Follow up of last question: How to stop unnecessary rerendering of react?
65. What are reducers?
66. If you refresh your browser, will that have any effect on redux?
67. When to use browser sessions and when to use browser’s local memory.
68. When to use react useref?
69. Advantages of using react js?
70. Different methods to store data over multiple tabs?
71. What are the pros and cons of react?
72. States vs props
73. States vs variable

You might also like