React Questions March 16, 2023 | No Comments 0 votes, 0 avg 10 123456789101112131415 React Questions 1 / 15 1. Which of the following is true about the below syntax ?disabled = {false} A. rendered as disabled B. rendered at all C. rendered as enabled D. none of these 2 / 15 2. React.js is written in which of the following language? A. c B. c++ C. java D. javascript 3 / 15 3. What is the correct syntax to import a Component from React? A. import { Component } from ‘react’ B. import Component from ‘react’ C. import React.Component from ‘react’ D. import [ Component ] from ‘react’ 4 / 15 4. What is the output of the below code ? var Geeks=(props)=> { return( DSA Course 1 DSA Course 2 ); } ReactDOM.render( < DSA Course/ > ,mountNode) A. DSA Course 1 B. DSA Course 2 C. DSA Course 1 DSA Course 2 D. Error 5 / 15 5. Regarding JSX attributes, Which of the following statement is true? A. Attribute names can be used in CAML case B. Attribute names can be used in Sentence case C. Any case can be used it does not matter like html D. none of these 6 / 15 6. How can you combine the following arrays using the spread operator? A. const combined = [array1, array2]; B. const combined = …array1 + …array2; C. const combined = […array1, …array2]; D. const combined = array1 + array2; 7 / 15 7. How do you fix the syntax error that results from running this code? const person =(firstName, lastName) => { first: firstName, last: lastName } console.log(person("Jill", "Wilson")) A. Wrap the object in parentheses. B. Call the function from another file. C. Add a return statement before the first curly brace. D. Replace the object with an array. 8 / 15 8. Find the bug in this code : function car({make, model}) { return < h1 > {make} {model} < /h1 > ; }; A. Add parenthesis around the return value B. Remove the return statement C. Wrap the return in a fragment D. The first letter of the function must be capitalized 9 / 15 9. What helps react for keeping their data unidirectional.? A. jsx B. props C. flux D. Dom 10 / 15 10. JSX is acronym for A. java server extension B. javascript extension C. java script extender D. none of these 11 / 15 11. When rendering a list using the JavaScript map() method, what is required for each element rendered? A. id B. key C. data D. index 12 / 15 12. Arbitrary inputs of components in React are called A. Kyes B. Props C. Elements D. Ref 13 / 15 13. Which of the following method refers to the parent class in React.js? A. self() B. super() C. this() D. static() 14 / 15 14. What can you use to handle code splitting? A. React.split B. React.lazy C. React.memo D. react.fallback 15 / 15 15. What is the output of the following code? const make = 'Ford'; const model = 'Mustang'; const car = { make, model }; console.log(car); A. {car: ‘Ford’, car: ‘Mustang’}} B. {{make: ‘Ford’, model: ‘Mustang’}} C. {make: ‘Ford’, model: ‘Mustang’} D. {car: {make: ‘Ford’, model: ‘Mustang’}} Your score is The average score is 17% LinkedIn Facebook Twitter VKontakte 0% Restart quiz Questions, Quiz