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

The goal of this coding exam is to quickly get you off the ground with the array method every ()


There is a selecting going on for civil service centre candidates have to participate in a number of events and the candid pose quotes more than 75 points in every event will be selected


Given candidateList as input it contains objects with name of the candidate and array consisting of poet attitude in each given by the candidate


Write a JS program to,

. Filter the candidates who have score more than 75 points in every event.

. Log the consisting of names of the selected candidates in the console


Input:

. The input will be a single line containing an array of objects candidatesList

Constraints

.keys object should be given in quotes


Sample input

[{'name:'blake,'points':[76,98,88,84]},{'name':'james','points':[098,12,33]},]



Output

[Blake]


Write a function solution that given a three digit integer N and Integer K, returns the maximum possible three digit value that can be obtained by performing at most K increases by 1 of any digit in N


Person Details

given an object person containing a person details, write a JS program to log the name, address and nicknames count.

input1

  • the input will be a single containig an object person

output2

  • the first line of output should contain the name and address of the person as shown in the sample output
  • the second line of output should contain nicknames count as shown in sample output.

input1

{ 'name':'Pranay', 'address':{'city':'Mumbai','state':'maharastra'}, 'nicknames':['nani','chanti']}

output2

pranay is from mumbai,maharastra

pranay has 2 nicknames


"use strict";

process.stdin.resume();

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

let inputString = "";

//////

/////

/////

function main() {

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


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


 /* Write your code here and log the output */

}



Magical Indices

Given an array of integers and a number

Write a JS program to determine the number of valid indices.


Input

  • The first line of input contains an array
  • The second line of input contains a number

Output

  • The output should be a number indicating the number of valid positions

Explanation

For example, an array A = [10, 20, 30] and a value x = 25.

We have values 10, 20, 30 at indices 0,1,2 respectively.

  • Here index 0 is invalid because
  • 10 + 25 = 35 is less than 20 + 30 = 50
  • Here index 1 is valid because
  • 20 + 25 = 45 is greater than 10 + 30 = 40
  • Here index 2 is valid because
  • 30 + 25 = 55 is greater than 10 + 20 = 30

So there are 2 valid indices.

Sample Input 1

[1, 2, 3, 5, 7]

13

Sample Output 1

3

"use strict";

process.stdin.resume();

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

/////

////

function main() {

 let integers = JSON.parse(readLine());

 let value = JSON.parse(readLine());

 /* Write your code here and log the output */

}



Product of array Items

given an array integers, write JS program to get the product of the integers in the given array.

input

the input will be containing single line integers.

output

the output should be single line containing the product as shown in sample outputs.


input1

[1,2,3]

output1

[1 * 2 * 3 = 6]

input2

[-1, -2, -3]

output2

[-1*-2*-3 = -6]


"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 integers = JSON.parse(readLine());


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


 /* Write your code here and log the output */

}



squares of Array items

input

  • the input will be a single line containing an array myArray. the myArray consists of numbers and array.

output

  • the output should containig the square of each item.


input1

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

output1

[ [ 1,4],[9,16],[25,36]]


input2

[12,[24],36,[48,60]]

output2

[144,[576],1296,[2304,3600]]


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


 /* Write your code here and log the output */

}



Find the First Value

Given an array myArray of positive integers, write a JS program to find the smallest integer divisible by 2 and 3.

input

the input will be a single line containing an myArray

output

the output should be a single line containing a number divisible by 2 and 3 or undefined.

input1

[51,18,15,12]

output1

12

input2

[41,29,17,19,31]

output2

undefined


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

 /* Write your code here and log the output */

}




Replacing Array Item

input

  • the first line of input contains an array myArray
  • the second line of input contains a targetItem
  • the third line of input contains a replaceItem

output

  • the output should be an array containing the replaceItem.

input1

[1,2,3,"four",5,6]

"four"

4

output1

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


input2

[22,44,88,352,352]

352

176

output2

[22,44,88,176,352]


"use strict";


process.stdin.resume();

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


let inputString = "";

let currentLine = 0;

////

/////

function main() {

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

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

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


  Write your code here and log the output

}

















CCBP Login

Reference image:

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

<!DOCTYPE html>

<html>

<head> </head>

<body>

  <div class="container">

    <h1 class="form-heading">CCBP Login</h1>

    <form id="myForm">

      <div class="username">

        <label for="name" class="username-heading">User Name</label>

        <input autocomplete="off" type="text" id="name" class="input" />

        <p id="nameErrMsg" class="error-message"></p>

      </div>

      <div class="password">

        <label for="password" class="password-heading">Password</label>

        <input type="password" id="password" class="input" />

    



Bike Search

Use the below reference image

https://assets.ccbp.in/frontend/content/dynamic-webapps/bike-search-op.gif

HTML

<!DOCTYPE html>

<html>


<head></head>

<body>

  Your code goes here

</body>

</html>

Instructions

  • Add the id searchInput to the HTML input element
  • Add the id searchResults to the HTML container element

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

  • When the page is opened or a value is entered in the HTML input element with id searchInput and press on Enter key
  • Make an HTTP Request (GET method) using Fetch with URL https://apis.ccbp.in/city-bikes?bike_name=
  • The value entered in the HTML input element with id searchInput should be the value for the query parameter of the given URL
  • Add the loading status with the Bootstrap component spinner while making HTTP Request (GET method) as shown in the image.




LATEST TUTORIALS
APPROVED BY CLIENTS