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 the array

Given an myArray write a JS program to find duplicate in the Array.


input1

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

output1

7

input1

{'light'', "dark", "twinlight"]

output2

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

}


function main() {

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


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


/* Write your code here */

}



Find the Duplicate in the array

Given an myArray write a JS program to find duplicate in the Array.


input1

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

output1

7

output1

{'light'', "dark", "twinlight"]


"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 main() {

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


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


/* Write your code here */

}


Hourly Stop Watch

The goal of this coding exam is to quickly get you off the ground with the clearInterval and setInterval.

Refer to the below image.

https://assets.ccbp.in/frontend/content/react-js/hourly-stop-watch-op.gif

Achieve the given functionality using JS.

The timer should be initiated at 0.

  • When the HTML button element with the id
  • startBtn is clicked, the timer should be started.
  • When the HTML button element with the id
  • stopBtn is clicked, the timer should be stopped.
  • When the HTML button element with the id
  • And do not include onclick events in the html button elements.
  • we need to access those dynamically
  • startBtn is clicked after the HTML button element with id stopBtn clicked, the timer should be resumed.
  • Timer should reset to 00 minutes, 00 seconds after one hour.

Note

This is a one hour timer. The maximum time is one hour.





an h1 element containing "Assignment 4"

an h2 element containing the name of your favourite sport or hobby

a p element with a description of the sport or hobby you chose (just a sentence or two)

2. Create a JavaScript file named script.js. Associate this file with your HTML file using the best

practices taught in class.

3. In the JavaScript file do the following:

create a variable that contains your name

console.log the value of this variable

include the following code in your JavaScript file. Don't worry about how it works for now,

we will cover this in the next module, but it will replace the text in the h2 element when

viewing the webpage. (Use the variable name that you created instead of myName.)

document.querySelector('h2').textContent = myName;

4. Open your HTML file in a web browser. Check the console for you output and the web page for

the replacement text on the page.





Visitors purchase the courses via credit card on the provision of information like credit card number, date, and 3-digit CVC code


After successful payment, a service name “SecureTransfer” automatically runs and passes all the sensitive details of the visitor’s credit card to another server via a highly secure channel. A positive acknowledgment is generated to the visitor’s webpage with a message of “Course Purchased Successfully”. The visitor will have a negative impression if the service/server takes too long to acknowledge their request.


Point of Discussion:


In your opinion, which encryption technique should be used in the “SecureTransfer” service?


· Symmetric Encryption Approach

· Asymmetric Encryption Approach

· Hybrid Encryption Approach (Combination of Symmetric and Asymmetric)


Justify your answer with at least two valid reasons.

(I NEED THE ANSWER OF THIS QUESTION)



Javascript excercise: Create a new html file. Give provision for users to insert a number (you can use prompt boxes or text fields). If the user inserts a number, show the multiplication table for that number in console log. But, if the user inserts anything other than a number, show appropriate error messages.


 Continuation of assignment from Lab 5: When all the mandatory form details (name and email) are enterd correctly to the form created in lab 5, the form is considered valid. When user clicks on submit button, show a preview of the entire form data in an alert window. (hint: refer to examples done in class)


Visitors purchase the courses via credit card on the provision of information like credit card number, date, and 3-digit CVC code (written on the back of the credit card).



After successful payment, a service name “SecureTransfer” automatically runs and passes all the sensitive details of the visitor’s credit card to another server via a highly secure channel. A positive acknowledgment is generated to the visitor’s webpage with a message of “Course Purchased Successfully”. The visitor will have a negative impression if the service/server takes too long to acknowledge their request.



Point of Discussion:



In your opinion, which encryption technique should be used in the “SecureTransfer” service?



· Symmetric Encryption Approach


· Asymmetric Encryption Approach


· Hybrid Encryption Approach (Combination of Symmetric and Asymmetric)



Justify your answer with at least two valid reasons.

Use Localstorage using textarea:


Use the below reference image link:.

https://res.cloudinary.com/dfxicv9iv/image/upload/v1618940947/localstorage-textarea_yvgdzf.gif

Achieve the design with HTML, CSS, and functionality with JS.

  • When the Save button is clicked
  • If the value in the HTML textarea element is non-empty, store textarea value in local storage with the key yourStory.
  • When we open or reload the page,
  • The value which exists in local storage with id yourStory should be displayed.

Quick Tip

Use bootstrap button primary.



DOM Manipulations

Use the below reference image link:.

https://res.cloudinary.com/dfxicv9iv/image/upload/v1619260598/dynamic-dom-manipulations-3_bov0vg.gif

When the Delete button is clicked

  • The blog element and the respective button should be deleted.

Note

Use the removeChild method to remove the element from DOM.


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS