Create 5 MCQ questions for a course titled "React" about "react for beginners".…
- User
User: Create 5 MCQ questions for a course titled "React" about "react for beginners". Each question should have 4 options and specify the correct answer. Format like: Q1. Question text? a) Option1 b) Option2 c) Option3 d) Option4 Answer: Option User: Create 5 MCQ questions for a course titled "React" about "react for beginners". Each question should have 4 options and specify the correct answer. Format like: Q1. Question text? a) Option1 b) Option2 c) Option3 d) Option4 Answer: Option Assistant:
- Assistant
Q1. What is React primarily used for? a) Styling web pages
b) Building user interfaces
c) Database management
d) Server configuration
Answer: b) Building user interfacesQ2. Which of the following is used to create a React component? a) function MyComponent() {}
b) class MyComponent extends React.Component {}
c) Both a and b
d) Neither a nor b
Answer: c) Both a and bQ3. In React, what is JSX? a) A type of JavaScript syntax that allows HTML to be written inside JavaScript
b) A CSS framework
c) A database query language
d) A build tool for React apps
Answer: a) A type of JavaScript syntax that allows HTML to be written inside JavaScriptQ4. How do you pass data from a parent component to a child component in React? a) Using state
b) Using props
c) Using context API
d) Using lifecycle methods
Answer: b) Using propsQ5. Which method is used to update the state in a React class component? a) setState()
b) updateState()
c) changeState()
d) modifyState()
Answer: a) setState()
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.