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