Welcome to Quiz Exams.

Quiz of React

Total Questions: 8

Question No : 1

React is mainly used for _______ (if needed, google it)

Ans:

  • building User Interface
  • building Database
  • building User Data Flow
  • building Shop
  • Question No : 2

    How do you declare a class called “myClass” in react?

    Ans:

  • class = “myClass”
  • Class = “myClass”
  • className = “myClass”
  • I don’t know
  • Question No : 3

    Which method will you use in react to display components for each object in an array?

    Ans:

  • filter
  • find
  • map
  • for
  • Question No : 4

    How will create a state with a default value “JingaLala”?

    Ans:

  • const { name, setName } = useState(“JingaLala”);
  • [name, setName] = UseState(“JingaLala”);
  • const ( name, setName ) = useState(“JingaLala”);
  • const [name, setName] = useState(“JingaLala”);
  • Question No : 5

    Why can’t we declare a class with the “class” keyword in React?

    Ans:

  • We should use class instead of className
  • class is a reserved keyword in javascript
  • We can use any name
  • Question No : 6

    What is  JSX?

    Ans:

  • Javascript Html
  • Javascript XML
  • React XML
  • Javascript Http
  • Question No : 7

    When creating a component in React, the first letter of that function name should be in ____

    Ans:

  • Uppercase
  • Lowercase
  • I can use Both
  • Question No : 8

    What is the correct way of creating a component in react?

    Ans:

  • function nayika() { return <h3>Mousumi </h3>}
  • function Nokiya() [ return <h3> Mousumi <h3> ]
  • function Nayika() ( return <h3> Mousumi </h3> )
  • function Nayika() { return <h3> Mousumi </h3> }
  • Developed and Operated by Office of the Nation Implementtation Committee . Powered by Ict Division & Bangabandhu Memorial Trust, Bangladesh .