HTML/JavaScript Web Application Answers

Questions: 680

Answers by our Experts: 648

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

Find the Duplicate in an Array

Given an array

myArray, write a JS program to find the duplicate item in the array.Input

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

Output

  • The output should be a single line containing the duplicate item or false if no duplicate item is present in the myArray

sample input 1

['light', 'dark', 'twilight']


sample ouput 1

false


sample input 2

[1, 2, 3, 4, 5, 6, 7, 7, 8]


sample output 2

7


Kindly share the solution for the Question #169775

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

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

By following the above instructions, achieve the given 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

ask the user to enter three of their favourite television shows. once they have entered there shows,display the results. Use an array to store the three favourite television shows.


Html coding
Topic
List of computer generation with their description.
Need html coding for given topic

what do you wish to calculate:

area perimeter

enter values ______ submit<----button


the page allows the user calculate area or perimeter of a parallelogram. First user will select an option, then enters necessary parameters separated by comma. write a JavaScript function called shapeFormulas(0 to calculate and display area or perimeter in an alert.

the function should display an error if user does not follow the required input format.

Area : base x height

perimeter : 2 x (side1+side2)


example one

user select area

input:5,10

output: the area is : 50


example two

user select perimeter

input:5,10

output:the perimeter is:30


example three

user select Area

input: 2 3

output: Invalid parameters


Consider the following HTML page:

<html><head></head>

<body>

<form id="form1" name="form1" method="post" action="">

Enter a value

<label for ="txtString"></label>

<input type="text" name="txtString" id="txtString"/>

<input type="submit" name="button" id="button" value="Submit"/>

</form></body></html>


Assume that the page accept a string .Write a JavaScript function called printString() to to display every other word in a new line.the output will be displayed as an alert.

input: Hickory dickory dock.the mouse went up the clock.

output:

Hickory

dock.

mouse

up

clock


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









totalTorpedos, torpedosFired as inputs, write a super class Submarine with property and methods as below,PropertyDescriptionisSubmergedIt should contain a boolean value to indicate whether the submarine is submerged or not.

MethodDescriptiondiveWhen this method is called, it should set the value of isSubmerged to true and log "Submarine Submerged" text in the console.surfaceWhen this method is called, it should set the value of isSubmerged to false and log "Submarine Surfaced" text in the console.

Add a sub class weaponUnit which extends to Submarine with the below properties and methods,

The sequence of operations is,

  1. Submerge the Submarine
  2. Fire torpedos
  3. Surface the Submarine

Sample Input 1

5

2

Sample Output 1

Submarine Submerged

2 Torpedos Fired, 3 Left

Submarine Surfaced

Sample Input 2

10

2

Sample Output 2

Submarine Submerged

2 Torpedos Fired, 8 Left

Submarine Surfaced




Book Search

In this assignment, let's build a Book Search page by applying the concepts we learned till now. .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 the drop down, Make a HTTP GET request to fetch the books based on the title entered and maximum number of results, If search results not equal to zero, then append the search results to the HTML container element with id searchResults, If search results equal to zero, thendisplay"Noresultsfound".

Develop User Interface as mentioned below as per the requirements:

Button One: Activate Button Two: Deactivate

Button One is pressed two fields and a button appear

Field 1: From Number Field 2: To Number

Button: Activate

Field 1 should auto-populate with the number queried from DB. And should not be changeable. The reason to still have a field is just to make it explicit what is happening.

When the Activate Button is pressed execute some action with parameter as below.

CALLACTION = "Call Forwarding On"

PHONENUMBER = From Number (From Field 1)

TOLLNUMBER = To Number (From Field 2)

Button Two is pressed a prompt and two buttons appear.

Prompt: "Are you sure you would like to deactivate the <Telephone Number>?" Where <Telephone Number> is the number initially queried.

Button 1: Yes Button 2: No



LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS