Skip to main content

Posts

Showing posts from February, 2023

Node Package Manager - Create scripts to find node and NPM version

NPM - Node Package Manager Problem Statement - 1. Perform the below mentioned steps by creating package.json file named npm_commands. (a) Create a file named index.js (b) Write a JavaScript code in index.js file to create a string named myVar and value as node package manager and convert it into uppercase. Note: Please use console.log to display the output of myVar in index.js 2. Configure scripts in package.json (a) to check the versions of npm and node by using npm run release | tee output1.txt (b) to execute index.js by using npm run build | tee output.txt Solution - 1. Inside challenge folder, create a JavaScript file named index.js and type the following code in it -      myVar = "node package manager"      console.log(myVar.toUpperCase()) 2. In the terminal, type the following command -      npm init      Different properties would be shown. By default, the package name would be challenge.      Enter "npm_commands" next to it.      Node modules would be creat

JavaScript - setTimeout and setInterval

Working with Timers Complete the function "logString" in the editor below. 'logString" has the following parameters:      input:stringToLog Write a timer function to log "Logging {stringToLog} every 0.5 seconds" 0.3 seconds after the server is started. Write a timer function to log "{stringToLog}" every 0.5 seconds and the string should log 5 times. Once the code is written, click Run Tests to run the test cases. Solution: function logString ( stringToLog ) {   let counter = 0 ;   function printSetTimeout () {     console . log ( `Logging ${ stringToLog } every 0.5 seconds` );   }   setTimeout ( printSetTimeout , 300 );   let timer = setInterval ( function () {     counter ++;     if ( counter === 5 ) clearInterval ( timer );     console . log ( stringToLog );   }, 500 ); }

IoE (Internet of Everything) Question Bank and Solution (MCQs) for Mumbai University Examination Information Technology Semester 8 - Part 2

Hello Everyone! This article is based on the Multiple Choice Questions related to IoE. These MCQs were given as question bank in Mumbai University-BE-Information Technology-Semester 8 Exam for the subject- Internet of Everything.  Q 1) Match the following characteristics of IoT- Column A Column B 1) Heterogeneity State of device changes 2) Enormous scale Anything can be interconnected with the global information and communication infrastructure 3) Dynamic changes Interaction is possible with other devices or service platforms through different networks 4) Thing related services The number of devices that need to be managed and that communicate with each other will be atleast an order of magnitude larger than the devices connected to the current internet 5) Interconnectivity Provides services such as pri

IoE (Internet of Everything) Question Bank and Solution (MCQs) for Mumbai University Examination Information Technology Semester 8 - Part 1

Hello Everyone! This article is based on the Multiple Choice Questions related to IoE. These MCQs were given as question bank in Mumbai University-BE-Information Technology-Semester 8 Exam for the subject- Internet of Everything. Q 1) A Bitwise Arbitration Tree anti-collision protocol aims to minimize the total number of slots, to increase RFID system efficiency. State the above Statement is True or False? a. True b. False Solution: a) True Q 2) ALOHA uses random access strategy in order to identify the number of tags in an interrogation area. a. True b. False Solution: a) True Q 3) CSMA based protocols are called as ______. a. Listen before talk b. Talk before listen c. Bot