Javascript Coding Questions
1. Implement a function that serialises a Javascript value into a JSON
string.
2. Currying [Link] - sum(1,2)(3)(4,5,6). Practise all variants of
currying
3. Implement a function that performs a deep copy of a value, but
also handles circular references.
4. Implement a function to construct a table of contents from an
HTML document.
5. Implement a function that returns a memoized version of a function
which accepts any number of arguments.
6. Implement a function that acts like setInterval but returns a
function to cancel the Interval.
7. Implement a function that merges two objects together.
8. Implement a function to recursively transform values.
9. Implement a function that determines if two values are deep equal.
10. Implement a function to highlight text if a searched term
appears within it.
11. Implement a function that creates a resumable interval object.
12. Implement a function that returns a memoized version of a
function which accepts a single argument.
13. Implement a class that can subscribe to and emit events that
trigger attached callback functions.
14. Implement a debounce function that comes with a cancel
method to cancel delayed invocations.
15. Implement a function to merge rows of data from the same user.
16. Implement a function that recursively flattens an array into a
single level deep. Also practise other variants.
17. Implement a function that returns an object with all falsy values
removed.
18. Implement a function to execute N async tasks in series.
19. Implement a promisify function that allows the original function
to override the return value.
20. Implement a function to convert all the keys in an object to
camel case.
21. Write polyfill of [Link] with customised nesting.
22. There are two sorted arrays. Merge them in place of the first
array.
23. Write a js function that can be invoked like below -
24. calc().add(10).subtract(5).multiply(20).divide(2).getResult() . In
this case, the output should be 50.
25. Web vitals-related questions - How does each vital work and
can be improved? Some scenario-related questions around it like if
SSR doc is delayed then what web vital would be most affected?
26. [Link]() polyfill
27. Cached fetch requests
28. Fetch requests with retries
29. Fill DOM from given array of objects, where each object has
properties required to create a dom element.
30. BFS, DFS Traversal of javascript objects
31. Remove circular link in javascript objects
32. Implement Event Emitters
33. Implement Observer Pattern