Online Exam Quiz

questionQuestion  1 to 30

What does the command npx stand for?

  • Node Package Executor
  • Node Program Executor
  • Node Process Executor
  • Node Project Executor
Mark for review

How do you create a new React application using create-react-app?

  • create-react-app my-app
  • create-react-app --init my-app
  • npx create-react-app my-app
  • react-app create my-app
Mark for review

Which of the following is a backend framework?

  • React
  • Angular
  • Express
  • Vue.js
Mark for review

Which hook is used to perform side effects in React?

  • useEffect
  • useState
  • useRef
  • useContext
Mark for review

Which of the following is a popular middleware for handling JSON requests in Express.js?

  • bodyParser
  • multer
  • cookieParser
  • cors
Mark for review

What does the "M" in MongoDB stand for?

  • MySQL
  • Middleware
  • MapReduce
  • MongoDB
Mark for review

How do you make an HTTP GET request in Node.js?

  • axios.get(url)
  • fetch(url)
  • http.get(url)
  • request(url)
Mark for review

How do you create a context in React?

  • React.createContext()
  • React.useContext()
  • React.initContext()
  • React.newContext()
Mark for review

Which of the following is used to style React components?

  • CSS
  • SCSS
  • Styled-components
  • All of the above
Mark for review

Which component is known as the root component in a React application?

  • App
  • Root
  • Main
  • Base
Mark for review

What is the command to create a new MongoDB database?

  • use dbname
  • create dbname
  • new dbname
  • make dbname
Mark for review

What does the npm command stand for?

  • Node Package Manager
  • New Programming Module
  • Node Program Manager
  • New Package Manager
Mark for review

What is JSX in React?

  • A JavaScript XML syntax extension
  • A JavaScript framework
  • A database query language
  • A type of HTTP request
Mark for review

Which method is used to fetch data in React using hooks?

  • useFetch
  • useEffect
  • useState
  • useReducer
Mark for review

Which method is used to update the state in a React component?

  • setState
  • updateState
  • changeState
  • setNewState
Mark for review

What does MERN stand for in MERN Stack?

  • MongoDB, Express, React, Node.js
  • MySQL, Express, React, Node.js
  • MongoDB, Express, Redux, Node.js
  • MongoDB, Express, React Native, Node.js
Mark for review

Which function is used to read a file in Node.js?

  • fs.readFile()
  • fs.getFile()
  • fs.loadFile()
  • fs.fetchFile()
Mark for review

Which command is used to install MongoDB on a server?

  • npm install mongodb
  • apt-get install mongodb
  • brew install mongodb
  • install mongodb
Mark for review

Which database is used in the MERN stack?

  • MySQL
  • MongoDB
  • PostgreSQL
  • SQLite
Mark for review

How do you create a new component in React?

  • function ComponentName() { }
  • create ComponentName() { }
  • new ComponentName() { }
  • define ComponentName() { }
Mark for review

What is the purpose of the useReducer hook in React?

  • To manage state
  • To fetch data
  • To handle side effects
  • To create context
Mark for review

Which of the following is a correct way to create a functional component in React?

  • function MyComponent() { return <div></div>; }
  • class MyComponent extends React.Component { render() { return <div></div>; } }
  • React.createComponent() { return <div></div>; }
  • const MyComponent = () => { return <div></div>; }
Mark for review

What does the command npm init do?

  • Initializes a new Node.js project
  • Installs npm
  • Updates npm
  • Creates a new package
Mark for review

What is the purpose of the package.json file in a Node.js project?

  • To define project metadata
  • To create a new project
  • To install dependencies
  • To manage server configurations
Mark for review

What is Node.js primarily used for in the MERN stack?

  • Creating database schemas
  • Building server-side applications
  • Managing user sessions
  • Developing mobile apps
Mark for review

Which lifecycle method is invoked after a component is rendered in React?

  • componentDidMount
  • componentWillMount
  • render
  • componentWillUnmount
Mark for review

Which of the following is a NoSQL database?

  • PostgreSQL
  • MySQL
  • MongoDB
  • SQLite
Mark for review

What is the purpose of the express.Router() in Express.js?

  • To create a new route instance
  • To handle HTTP methods
  • To set up middleware
  • To manage server configurations
Mark for review

How do you install Express.js using npm?

  • npm install express
  • npm get express
  • npm add express
  • npm build express
Mark for review

What does the express.static middleware do?

  • Serves static files
  • Handles JSON requests
  • Manages sessions
  • Routes API requests
Mark for review

blinkerOnline

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • Answered
  • Not Answered
  • Marked for Review