HTML/JavaScript Web Application Answers

Questions: 588

Answers by our 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 & Filtering

Unite Family


Sample Input

{'surname' : 'Jones', 'city': 'Los Angeles'}

{'dish': 'puddings'}

{'pet': 'Peter'}


Sample Output

Mr and Mrs Jones went to a picnic in Los Angeles with a boy and a pet Peter. Mrs Jones made a special dish "puddings"


"use strict";


 return inputString[currentLine++];

}


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


function main() {

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

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

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

 

 /* Write your code here */ 


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

 console.log(`Mr and Mrs ${family.surname} went to a picnic in ${family.city} with a boy and a pet ${family.pet}. Mrs ${family.surname} made a special dish "${family.dish}"`);

}


Objects with given Fruit


Given an array of objects


objectEntities in the prefilled code and fruit as an input, write a JS program to log the array of objects containing the given fruit.

Input

The input will be a single line containing a string


fruitOutput

The output should be the array of objects matching the given


fruit




Sample Input 1


apple




Sample Output 1


[


{ fruit: 'apple', vegetable: 'broccoli' },


{ fruit: 'apple', vegetable: 'cauliflower' }


]




Sample Input 2


orange




Sample Output 2


[ { fruit: 'orange', vegetable: 'mushrooms' } ]




i want code in between write your code here




"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 fruit = readLine();


const objectEntities = [


{


fruit: "apple",


vegetable: "broccoli"


},


{


fruit: "kiwi",


vegetable: "broccoli"


},


{


fruit: "apple",


vegetable: "cauliflower"


},


{


fruit: "orange",


vegetable: "mushrooms"


},


];



/* Write your code here */




}


Tip

The formula to calculate the fare per kilometer is,

fare per kilometer = fare / distance

Input input contains a numberOutput

should be a single line containing the fare per kilometer

"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 Ride(fare, distance) {  

 /* Write your code here */

}

/* not modify anything below this line */

function main() {

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

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

 const ride1 = new Ride(fare, distance);

  

 console.log(ride1.getFarePerKilometer());

}


Input1

{'surname' : 'Jones', 'city': 'Los Angeles'}

{'dish': 'puddings'}

{'pet': 'Peter'}

Output1

Mr and Mrs Jones went to a picnic in Los Angeles with a boy and a pet Peter. Mrs Jones made a special dish "puddings"


function readLine() {

 return inputString[currentLine++];

}

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

function main() {

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

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

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

 /* Write your code here */ 

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

 console.log(`Mr and Mrs ${family.surname} went to a picnic in ${family.city} with a boy and a pet ${family.pet}. Mrs ${family.surname} made a special dish "${family.dish}"`);

}


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


Sample Input 1

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

Sample Output 1

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

input2

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

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 */

function main() {

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

  

 /* Write your code here */

}




let's build a Book Search page Refer to the below image.

https://assets.ccbp.in/frontend/content/dynamic-webapps/book_search_output.gif

achieve functionality.

  • When a value is entered in the HTML input element with id searchInput and press on Enter key
  • Get title, imageLink, author (HTTP response with key search_results) by making HTTP request using fetch with URL https://apis.ccbp.in/book-store?title=kalam&maxResults=30
  • Set imageLink in the HTML img element and set author in the HTML paragraph element
  • When a value is entered in the HTML input element with id searchInput and an option is selected in drop down
  • Make HTTP GET request to fetch books based on the title entered, maximum number of results
  • If search results not equal to zero, append the search results to the HTML container element with id searchResults
  • If search results equal to zero, then "No results found"


PLEASE WRITE HTML AND JAVASCRIPT CODE FOR THIS...


Bookmark Maker

let's build a Bookmark Maker

Instructions:

  • The page should have HTML form element with id bookmarkForm
  • The HTML form element with id bookmarkForm should have HTML input elements with ids siteNameInput and siteUrlInput
  • The HTML form element with id bookmarkForm should have HTML button element with id submitBtn
  • Add HTML label elements for HTML input elements with ids siteNameInput and siteUrlInput
  • The HTML form element with id bookmarkForm should have HTML p elements with ids siteNameErrMsg and siteUrlErrMsg
  • The page should have HTML unordered list element with id bookmarksList
  • Each bookmark item should contain a HTML anchor element to navigate to the bookmarked site

Warning

  • Please provide valid URL's to the siteUrlInput element

By following the above instructions, achieve the given functionality.

  • When the HTML button element with the id submitBtn is clicked,
  • If the values are entered in the HTML input elements with ids siteNameInput and siteUrlInput
  • A new bookmark should be added to the bookmarksList as list item.
  • If the siteNameInput value is empty,
  • The HTML p element with id siteNameErrMsg should have error message
  • If the siteUrlInput value is empty,
  • The HTML p element with id siteUrlErrMsg should have error message
  • When the visit button of a bookmark is clicked the site URL should open in a new tab.
  • When the HTML input element with id siteNameInput is empty after changing the value inside the input
  • The HTML p element with id siteNameErrMsg should have error message
  • When the HTML input element with id siteUrlInput is empty after changing the value inside the input
  • The HTML p element with id siteUrlErrMsg should have error message




create page that . Has the functionality to upload pictures and a description of the picture. Use HTML, PHP, or JavaScript. Please show the database SQL code


Write a JavaScript code by using HTML and CSS


Program name is Custom Range Counter


Custom Range Counter


Instructions:

  • Add the ids fromUserInput and toUserInput to the HTML input elements correspondingly
  • Add an id counterText to the HTML paragraph element with the class name counter

By following the above instructions, achieve the given functionality.

  • When the HTML button element with the id startBtn is clicked,
  • If the values of fromUserInput or toUserInput are not empty, display the numbers from fromUserInput to toUserInput for each second in the HTML element with the id counterText.
  • If the value of fromUserInput or toUserInput is empty, show a corresponding alert message to enter the input value.

Here is the Output Image on link below


https://drive.google.com/file/d/1aUujQ6KsVQKmVEjnBuCeu16Nd0Pr1-al/view?usp=sharing


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


Sample Input 1

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

Sample Output 1

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


"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 */

}


LATEST TUTORIALS
APPROVED BY CLIENTS