Uncategorized FrontEnd Screening Test by Collab Team Contributor Feb 22, 2025 0 Comment FrontEnd Screening Test 1 / 20 What is the key benefit of using Virtual DOM in React? It enables automatic CSS styling It speeds up performance by reducing direct DOM manipulation It directly modifies the real DOM It allows using different programming languages 2 / 20 What will be the output of console.log(0.1 + 0.2 === 0.3)? NaN true undefined false 3 / 20 What is the purpose of a service worker in a PWA? To replace JavaScript A) To manage CSS styling B)C) D) To handle offline capabilities and caching To execute server-side logic 4 / 20 What is the difference between var, let, and const? var cannot be reassigned, let and const can var is function-scoped, let and const are block-scoped let is globally available const can be reassigned 5 / 20 Which of the following will NOT change the original array in JavaScript? push() pop() splice() map() 6 / 20 What will be the output of console.log(typeof NaN)? NaN Null Undefined Number 7 / 20 In CSS Grid, what does grid-template-columns: repeat(3, 1fr); do? Creates a flexible column layout Creates 3 columns of equal width Creates a responsive design All of the above 8 / 20 What is the purpose of React’s useState hook? To manage global state To manage component state in function components To handle API requests To replace Redux 9 / 20 What is the primary difference between == and === in JavaScript? There is no difference == checks only data type, while === checks only value == compares values, === compares values and types === is faster than == 10 / 20 In React, which lifecycle method is invoked right after a component is inserted into the DOM? componentDidMount componentDidUpdate componentWillUnmount shouldComponentUpdate 11 / 20 How do you prevent a default event behavior in JavaScript? event.cancelEvent() event.stop() event.preventDefault() event.stopPropagation() 12 / 20 Which HTTP status code represents a successful request? 200 302 400 500 13 / 20 In JavaScript, what is the purpose of the bind() method? To bind a function to a specific this context To modify function parameters To prevent function execution To execute a function immediately 14 / 20 What is the purpose of React's useEffect hook? To modify the state To directly manipulate the DOM To replace setState To manage side effects in functional components 15 / 20 Which of the following is NOT a valid JavaScript data type? Character Undefined Symbol Boolean 16 / 20 What is a closure in JavaScript? A function that returns another function A function that is executed immediately A function that has access to variables from its outer scope A function with no parameters 17 / 20 What is the difference between localStorage and sessionStorage? localStorage persists data even after the browser is closed Both store data permanently localStorage can store larger data than sessionStorage sessionStorage stores data permanently 18 / 20 What is the difference between .call() and .apply() in JavaScript? .call() executes a function asynchronously .call() passes arguments separately, .apply() takes an array of arguments .apply() is faster than .call() .apply() is used for defining class components 19 / 20 In CSS, which unit is relative to the width of the viewport? em rem px vh 20 / 20 Which of the following is a CSS preprocessor? SCSS SASS LESS All of the above Your score isThe average score is 57% 0% Restart quiz
Leave a Reply Cancel replyYour email address will not be published. Required fields are marked *Comment Name* Email* Save my name, email, and website in this browser for the next time I comment.
Leave a Reply