HTML/JavaScript Web Application Answers

Questions: 127

Free Answers by our Experts: 126

Ask Your question

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 & Filtering

  1. Task #2 – Wanna play a game?
  2. We want to create a short program that performs the following task. A user is asked if they would like to play a game. If they answer y, yes, Yes or any other variation of the word (starting with a Y) – we will print to the screen “Hooray! So glad to be playing a game with you!”. If they answer n, no, No or any other variation of the word No (starting with an N), then we will display to the screen “Sorry that you don’t want to play with me :( “. If they enter any other value, we display “Sorry – didn’t get that – please enter your choice again” and they will be prompted to run the program once more. Your code must include the following:
  • toLowerCase function, a loop and the substr function 

create JavaScript program for both task in html coding


Assignment #10 – Arrays

Task#1 – Favourite Places


Ask the user to enter ten of their places they have visited in their life. Once they have entered there favourite places, display the results. Use an array to store the ten favourite places.


Task#2 – Favourite Actor


Ask the user to enter their favourite actor and the role that the actor played. Save the actors in one array and the roles in another array. Ask for four favourite actors. Then ask the user for one of their favorite actors. Find the role that the actor played and display it to the screen.


Given two boolean values

isGrassTrimmerFound and isWaterHosePipeFound as inputs, create three JS promises using async/await and try/catch blocks.


Make a website using HTML and CSS all about Zombies


Given an array

myArray, write a JS program to check whether each value of the array is a string or not using the array method every().Input

  • input will be a single line containing an array myArray

Output

  • output should be a single line containing a boolean value

Input 1

[ 'frozen', 'rock', 'stained', 'basket' ]

Output 1

true

Input 2

[ 'recycling', 70, 'pastime', 'animal' ]

Output 2

false


"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++];

}

/*not modify anything above this line */

function main() {

 const myArray = JSON.parse(readLine().replace(/'/g, '"'));

 /* Write your code here */

}



given myArray of numbers, write a function to square the alternate numbers of the myArray, starting from index 0 using the array method map.Input

  • input will be a single line containing  myArray

Output

  • output should be a single line containing an array with alternate numbers squared

Constraints

  • Each value in the array must be a number

1 Input

[ 1, 2, 3, 4, 5 ]

1 Output

[ 1, 2, 9, 4, 25 ]

2 Input

[ 2, 4 ]

2 Output

[ 4, 4 ]

"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++];

}

/*not modify above this line */

function main() {

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

 /* Write your code here */


Array of String to UpperCase

myArray of strings as an input, write a JS program to convert all the strings in myArray to uppercase.Input

  • The input will be a single line containing an array myArray

Output

  • The output should be a single line containing an array of strings in uppercase

Sample Input 1

[ 'book', 'table', 'strawberries', 'lemons' ]

Sample Output 1

[ 'BOOK', 'TABLE', 'STRAWBERRIES', 'LEMONS' ]

Sample Input 2

[ 'my best friend', 'florida', 'winter' ]

Sample Output 2

[ 'MY BEST FRIEND', 'FLORIDA', 'WINTER' ]


"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++];

}

/* not modify anything above this line */


Book Search

In this assignment, let's build a Book Search page by applying the concepts we learned till now.

Refer to the below image.



Instructions:

  • Add HTML input element with id searchInput inside an HTML container element
  • Add HTML select element with id selectDisplayCount inside an HTML container element
  • Add HTML container element with id searchResults

sir plz provide the code for this program


String Slicing
Given two strings 
inputString and subString as inputs, write a JS program to slice the inputString if it includes the subString. Slice the inputString starting from the subString to the end of the inputString.Input
The first line of input contains a string inputString
The second line of input contains a string subString
Output
The output should be a sliced string or inputString (if the inputString does not include the subString)
Sample Input 1
JavaScript
S
Sample Output 1
Script
Sample Input 2
Language
air
Sample Output 2
Language
"use strict";
function readLine() {
 return inputString[currentLine++];
}
function main() {
 let inputString = readLine();
 const subString = readLine();
 /* Write your code here */ 
 console.log(subString.substr(inputString.substr(subString)));
}

Fare per Kilometer

Given total fare

fare and distance travelled in kilometers distance for a rental bike, write a JS constructor function with a method to calculate the fare per kilometer.

Quick Tip

The formula to calculate the fare per kilometer is,

fare per kilometer = fare / distance

Input

The first line of input contains a number

fare The second line of input contains a number distanceOutput

The output should be a single line containing the fare per kilometer


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS