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

Magical Indices

Given an array of integers and a number

  • x. An index is valid ifitem y at an index is increased by x and
  • x+y would be greater than the sum of all other items in the array.

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

Sample Input 2

[34, 32, 37, 38, 40]

10

Sample Output 2





Product of Array Items

Given an array

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

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

Output

  • The output should be a single line string containing the product as shown in sample outputs

Sample Input 1

[1, 2, 3]

Sample Output 1

1 * 2 * 3 = 6

Sample Input 2

[-1, -2, -3]

Sample Output 2

-1 * -2 * -3 = -6




Replacing Array Item

Given an array

myArray, targetItem, and a replaceItem, write a JS program to replace the targetItem with the given replaceItem in myArray. If myArray consists of more than one targetItem replace the first occurrence.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 replaced item.

Sample Input 1

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

"four"

4

Sample Output 1

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

Sample Input 2

[22, 44, 88, 352, 352]

352

176

Sample Output 2

[ 22, 44, 88, 176, 352 ]




Squares of Array Items

Given an array

myArray, write a JS program to get the squares of each item in the given myArray.Input

  • The input will be a single line containing an array myArray
  • myArray consists of numbers and arrays

Output

  • The output should be an array containing the square of each item

Sample Input 1

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

Sample Output 1

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

Sample Input 2

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

Sample Output 2

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




In this assignment, let's build an Instagram Story Viewer page by applying the CSS concepts we learned till now.

Instructions:

  • The direction of the linear-gradient for the banner section should be different for devices below 768px and equal and above 768px.
  • Use the HTML nav element to provide navigation links, either within the current document or to other documents.
  • The links in the HTML nav element should be hidden in devices below 768px and visible in devices equal to and above 768px.
  • The HTML input element and HTML button element for search should be hidden in devices below 768px.
  • The features of the Instagram Story viewer should be displayed vertically in devices below 768px.
  • The features of the Instagram Story viewer should be displayed horizontally in devices equal to and above 768px.

Note

  • Achieve the design using the CSS Flexbox layout and Media queries.
  • Try to achieve the design as close as possible.

Choose the correct option. Where all Java program files are stored, in the folder:

A.) bin

B.) scr


Find mistakes:

import java.applet.*;

import java. .*


public class Main extends JApplet

public paint (Graphics g) {

g.drawString ("Welcome in Java Applet!" , 40, 20);

}

}


Bookmark Maker


Write a HTML, CSS, JavaScript Dynamic Web Application Program for Bookmark Maker


The below Url is the Question and procedure of Bookmark Maker

https://drive.google.com/file/d/13KC5acqLGj61aayVab137d8s9rPArIfs/view?usp=sharing


Bookmark Maker


Write a HTML, CSS, JavaScript Dynamic Web Application Program for Bookmark Maker


The below Url is the Question and procedure of Bookmark Maker

https://drive.google.com/file/d/13KC5acqLGj61aayVab137d8s9rPArIfs/view?usp=sharing


Unite Family


Given three objects


father, mother, and child, write a JS program to concatenate all the objects into the family object using the spread operator.Input

  • The first line of input contains an object father
  • The second line of input contains an object mother
  • The third line of input contains an object child

Output

  • The output should be a single line string with the appropriate statement as shown in sample outputs

Constraints

  • Keys of the objects should be given in quotes


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"




LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS