HTML/JavaScript Web Application Answers

Questions answered by Experts: 588

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

Here in this program "aqString" was not defined please check it again

let inputString = '';

let currentLine = 0;

process.stdin.on('data', inputStdin => {

inputString += inputStdin;

});

process.stdin.on('end', _ => {

inputString = inputString.trim().split('\n').map(string => {

return string.trim();

});

main();

});

function readLine() {

return inputString[currentLine++];

}

function main() {

const inputString = readLine();

const subString = readLine();

let index = aqString.find(inputString, subString);

if (isNaN(index) && index <= inputString.length) {

console.log(inputString.split(index));

}

}


Update Pickup Point

Write a Javascript program

Given a previous pickup point in the prefilled code, and updated

pickup point area , city as inputs, write a JS factory function

with a method to update the pickup point.


Input

. The first line of input contains a string area

. The second line of input contains a string city


Output

. The output should be a single line containing the updated pickup

point area and city separated by a space


Sample Input 1

Kukatpally
Hyderabad

Sample Output 1

Kukatpally Hyderabad

Sample Input 2

Jubilee Hills
Hyderabad

Sample Output 2

Jubilee Hills Hyderabad




All test cases should be passed

Sample Input 1

true
true

Sample Output 1

Grass Trimmed
Garden Cleaned
Watered Plants

Sample Input 2

true
false

Sample Output 2

Grass Trimmed
Garden Cleaned
Water Hose Pipe Not Found

let inputString = "";

let currentLine = 0;

process.stdin.on("data", (inputStdin) => {

 inputString += inputStdin;

});

process.stdin.on("end", (_) => {

 inputString = inputString.trim().split("\n").map((str) => str.trim());

 main();

});

function readLine() {

 return inputString[currentLine++];

}


function main() {

 const isGrassTrimmerFound = JSON.parse(readLine());

 const isWaterHosePipeFound = JSON.parse(readLine());

 /* Write your code here */

 const myPromise = async () => {

  try {

   /* Write your code here */  

  } catch(error) {

   /* Write your code here */ 

  }

 };

 

 myPromise();

}



I want to pass all test cases

Sample Output 1

Item Found

Sample Output 2

Category Not Found

let inputString = "";

let currentLine = 0;

process.stdin.on("data", (inputStdin) => {

 inputString += inputStdin;

});

process.stdin.on("end", (_) => {

 inputString = inputString.trim().split("\n").map((str) => str.trim());

 main();

});

function readLine() {

 return inputString[currentLine++];

}

function main() {

 const categoryOfItem = readLine();

 const item = readLine();

 const mart = [

  {

   category:"pulses",

   items: ["green gram", "green peas", "Turkish gram"]

  },

  {

   category:"soaps",

   items:["santoor", "dove", "lux", "pears"]

  },

 ]; 

 /* Write your code here */

}



In this assignment, let's build a Articles Page by applying the concepts we learned till now. You can use the Bootstrap concepts and CCBP UI Kit as well.


I want pass all test cases

Sample Input 1

8
4

Sample Output 1

2
576
1024

"use strict";

process.stdin.resume();

process.stdin.setEncoding("utf-8");

let inputString = "";

let currentLine = 0;

process.stdin.on("data", (inputStdin) => {

 inputString += inputStdin;

});

process.stdin.on("end", (_) => {

 inputString = inputString.trim().split("\n").map((str) => str.trim());

 main();

});

function readLine() {

 return inputString[currentLine++];

}

function ArithmeticOperations(firstNumber, secondNumber) {

 this.firstNumber = firstNumber;

 this.secondNumber = secondNumber;

}

function main() {

 const firstNumber = JSON.parse(readLine());

 const secondNumber = JSON.parse(readLine());

 const operation1 = new ArithmeticOperations(firstNumber, secondNumber);

 /* Write your code here */

 console.log(operation1.ratioOfNumbers());

 console.log(operation1.sumOfCubesOfNumbers());

 console.log(operation1.productOfSquaresOfNumbers());

}



I want pass all test cases

Sample Input 1

7

Sample Output 1

153.86
43.96

Sample Input 2

25

Sample Output 2

1962.5
157

"use strict";

process.stdin.resume();

process.stdin.setEncoding("utf-8");

let inputString = "";

let currentLine = 0;

process.stdin.on("data", (inputStdin) => {

 inputString += inputStdin;

});

process.stdin.on("end", (_) => {

 inputString = inputString.trim().split("\n").map((str) => str.trim());

 main();

});

function readLine() {

 return inputString[currentLine++];

}

/* Please do not modify anything above this line */

function Circle(radius) { 

 /* Write your code here */

}

/* Please do not modify anything below this line */

function main() {

 const radius = JSON.parse(readLine());

 const circle1 = new Circle(radius);

 console.log(circle1.getArea());

 console.log(circle1.getCircumference());

}



I want to pass all test cases

Sample Input 1

Kukatpally
Hyderabad

Sample Output 1

Kukatpally Hyderabad

"use strict";

process.stdin.resume();

process.stdin.setEncoding("utf-8");

let inputString = "";

let currentLine = 0;

process.stdin.on("data", (inputStdin) => {

 inputString += inputStdin;

});

process.stdin.on("end", (_) => {

 inputString = inputString.trim().split("\n").map((str) => str.trim());

 main();

});

function readLine() {

 return inputString[currentLine++];

}

/* Please do not modify anything above this line */

function createCabBooking(area, city) {

 /* Write your code here */

}

/* Please do not modify anything below this line */

function main() {

 const newArea = readLine();

 const newCity = readLine();

 const cabBooking1 = createCabBooking("Abids", "Hyderabad");

 cabBooking1.updatePickupPoint(newArea, newCity);

 console.log(`${cabBooking1.area} ${cabBooking1.city}`);

}





I want to pass all the test cases

Sample Input 1

1000
2
3

Sample Output 1

1060

Sample Input 2

2000

Sample Output 2

2200


"use strict";


process.stdin.resume();

process.stdin.setEncoding("utf-8");


let inputString = "";

let currentLine = 0;


process.stdin.on("data", (inputStdin) => {

 inputString += inputStdin;

});


process.stdin.on("end", (_) => {

 inputString = inputString.trim().split("\n").map((str) => str.trim());

 main();

});


function readLine() {

 let input = inputString[currentLine++]; 

 return input === undefined ? undefined : JSON.parse(input);

}


/* Please do not modify anything above this line */

  

 /* Write your code here */ 


/* Please do not modify anything below this line */


function main() {

 const principal = readLine();

 const time = readLine();

 const apprPercentage = readLine();


 const finalValue = calculateFinalValueWithAppreciation(principal, time, apprPercentage);


 console.log(finalValue);

}


I want to pass all the test cases

Sample Input 1

200
3

Sample Output 1

570

Sample Input 2

180
1

Sample Output 2

180



"use strict";

process.stdin.resume();

process.stdin.setEncoding("utf-8");

let inputString = "";

let currentLine = 0;

process.stdin.on("data", (inputStdin) => {

 inputString += inputStdin;

});

process.stdin.on("end", (_) => {

 inputString = inputString.trim().split("\n").map((str) => str.trim());

 main();

});

function readLine() {

 return inputString[currentLine++];

}

/* Please do not modify anything above this line */

function main() {

 const dayCharge = JSON.parse(readLine());

 const days = parseInt(readLine()); 

 /* Write your code here */

}


LATEST TUTORIALS
APPROVED BY CLIENTS