#web computing
- What are components in React? Create one class component “Car” in React and invoke it using index.js In React, components are the building blocks that allow you to split the user interface into reusable and independent pieces. Components can... 1
- Write a Javascript to change the background color of the web page to red color if button named “RED” <!DOCTYPE html> <html> <body> <button onclick="red()">red</button> <button onclick="green()">Green</button> <script> function red() { docume... 1
- Anonymous and Arrow Function Examples in ES6 An anonymous function is a function without a name (usually stored in a variable or passed as a callback); an arrow function is the shorter... 1
- Explain the MVC architecture with a diagram. What are the advantages of using it? MVC stands for Model-View-Controller. It is an architecture or a software design pattern that makes creating huge applications easy. It does... 2
- What are the criteria for an API to be a RESTful API? An API is RESTful when it follows the REST architectural constraints: client–server, statelessness, cacheability, a uniform interface, a lay... 1
- When are the React components re-rendered? Explain giving examples. 05 import React, { useState } from 'react'; function Counter() { const [count, setCount] = useState(0); const increment = () => { setCount(coun... 2
- B Write a JavaScript code to set a cookie on the user's computer. 05 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title... 1
- A Demonstrate the routing of web pages using React Router. 05 // App.js import React from 'react'; import { BrowserRouter as Router, Route, Link } from 'react-router-dom'; const Home = () => <h2>Home</h... 1
- Q4 B) Explain the architecture of NodeJs with a neat diagram. Node.js uses a single-threaded, event-driven, non-blocking I/O architecture: one main thread runs JavaScript on the V8 engine, while the lib... 1
- What is NodeJs? What are the advantages of using it? Node.js is an open-source, cross-platform runtime environment that allows developers to run JavaScript code outside the browser. It is built... 2
- Explain the class components in React. What are the advantages of using them? A class component is an ES6 class that extends React.Component, keeps its data in this.state, updates it with this.setState(), and returns i... 1
- A Explain the Document Object Model using a diagram. Write a code in JavaScript for any one of the following: The Document Object Model (DOM) is a programming interface for web documents. It represents the structure of a document as a tree of objects... 1
- Write a code making use of React Hooks that displays four buttons namely, “Red”, “Blue”, “Green”, “Yellow”. React Hooks are functions that allow functional components to have state, lifecycle methods, and other React features. They were introduced... 1
- Explain Forms and their types with examples Forms are an integral part of any modern web application. It allows the users to interact with the application as well as gather information... 1
- Explain the Component Lifecycle with a neat Diagram Components are the building blocks of React application that represents a part of the user interface. Reusable The React component goes thro... 2
- Difference between Stateful and Stateless Component Feature Stateful Component Stateless Component State Management Maintains state data and can change it over time. Does not maintain state in... 1
- Explain Props. What do you mean by Default props? It is an object which stores the value of attributes of a tag to create reusable custom components. Props are arguments passed into React co... 2
- What is Express Generator? Express Generator is a Node.js Framework like ExpressJS which is used to create express Applications easily and quickly. It acts as a tool f... 1
- Explain Cookies in Express Cookies are simple, small files/data that are sent to the client with a server request and stored on the client side. Every time the user lo... 2
- Explain REPL (READ, EVAL, PRINT, LOOP) REPL (READ, EVAL, PRINT, LOOP) is a computer environment similar to Shell (Unix/Linux) and command prompt. Node comes with the REPL environm... 1
- Compare ES 5 and ES 6. Write a code in JavaScript to validate the email address entered by the user Based on ES5 ES6 Definition ES5 is the fifth edition of the ECMAScript (a trademarked scripting language specification defined by ECMA Inter... 1
- Explain the event handling in React. Write a React code to create a button “Greet the User” Event handling in React allows you to respond to user interactions, such as clicks, form submissions, and mouse movements. React event handl... 1
- What is Express JS? Explain the advantages of using it. Express.js is a web application framework for Node.js, a runtime environment for server-side JavaScript. It simplifies the process of buildi... 1
- Write a JavaScript code for displaying a digital clock on a web page. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title... 1