Frontend
What do you like most about frontend and in which area do you want to develop?
In which HTTP methods is the body usually sent?
What is coupling and cohesion in development?
How do arrow functions differ from regular functions in JavaScript?
Refactor the given React code to improve its structure and readability. The code includes a product list with search functionality, a cart count, and a sum of prices. Implement the fetchProducts function to simulate fetching products with a delay and possible error. Use React hooks such as useState, useEffect, and useCallback appropriately. Ensure the UI updates correctly when adding products to the cart and clearing the cart.
const userStore = useUserStore() onMounted(() => { window.addEventListener('resize', handleResize) const interval = setInterval(() => { userStore.syncData() }, 5000) document.addEventListener('keydown', handleKeydown) function handleResize() { /* ... */ } function handleKeydown() { /* ... */ } })
var a = { firstName: 'Bill', lastName: 'Ivanov', sayName: function() { console.log(this.firstName); }, sayLastName: () => { console.log(this.lastName); } }; a.sayName(); // var b = a.sayName; b(); // a.sayName.bind({ firstName: 'Boris' })(); // a.sayName(); // a.sayLastName(); // a.sayName.bind({ firstName: 'Boris' }).bind({ firstName: 'Tom' })(); // a.sayLastName.bind({ lastName: 'Petrov' })(); //
Variable declaration list cannot be empty.
Have you ever optimized interface rendering? What approaches did you use, such as virtual scroll, lazy loading, or defer?
How to type the component props: using type or interface?
How to manage loading and execution of an external JavaScript file if you do not want to execute it immediately?
What happens if the <style> tag is placed not in <head>, but elsewhere in the document, for example in <body>?
What is minimally required for an HTML5 page to be considered valid?
Are you studying anywhere?
What are CSS selectors?
What are generics in TypeScript?
When does requestAnimationFrame execute in relation to the Event Loop and rendering?
Can an Angular guard be implemented as a regular function instead of a class or service?
How to use AsyncPipe for subscribing and automatically unsubscribing from an Observable?
How justified is a complete rejection of NgModule in new Angular projects? In which cases might modules still be needed?