1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Yuri [45]
3 years ago
14

Days of the week are represented as three-letter strings ("Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"). Write a javaScript f

unction solution that, given a string S representing the day of the week and an integer K (between 0 and 500), returns the day of the week that is K days later. For example, given S = "Wed" and K = 2, the function should return "Fri". Given S = "Sat" and K = 23, the function should return "Mon".
Computers and Technology
1 answer:
dmitriy555 [2]3 years ago
3 0

Answer:

function getDay(s, k){

var weekDays = ["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];

var index=weekDays.findIndex(function(weekDay){return weekDay==s;});

return weekDays[(index+k)%7];

}

Explanation:

//this functions receive the next parameters:

//s which is the day of the week

//k the number of days after s week day

function getDay(s, k){

var weekDays = ["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];

//variable index is the index in list weekDays of s

var index=weekDays.findIndex(function(weekDay){return weekDay==s;});

//use module operator % to get the remainder of the division (index+k)/7

//return the string value of the day

return weekDays[(index+k)%7];

}

You might be interested in
Jeff is a financial assistant. He needs to create a document for his client that tracks her stocks and calculates the loss or ga
seropon [69]
Spreadsheet. Brainliest answer plz??
4 0
3 years ago
Read 2 more answers
Comments can be hidden by clicking the _____ button.
Tamiku [17]
C because previous sends you back to something before such as a web page, Next does the opposite and I can't remember what Show MarkUp does.

5 0
3 years ago
The Windows Operating System: A) is a web-based operating system for the Internet era. B) is a data management application used
NNADVOKAT [17]

The Windows Operating System is an operating system used on most Wintel PCs throughout the world.

E) is an operating system used on most Wintel PCs throughout the world.

<u>Explanation:</u>

An operating system can be defined as a system software whose main function is to act as an interface between the user and the computer.  It performs different administrative elements of a PC and gives a graphical UI to the client with the goal that they can impart to the PC.  

Wintel is a PC exchange industry term for PCs dependent on the Intel chip and one of the Windows working frameworks from Microsoft. In the zone of work area and smart phones, Windows is commonly above 70% in many markets and at 78% all inclusive, Apple's macOS at around 14%, Google's ChromeOS at about 3% (in North America) and Linux at around 2%.  

The term Wintel PCs originate from the mix of two words: Windows and Intel, which allude to the PCs that work on the Windows Operating System and use Intel Processors.

6 0
3 years ago
What is radial gradient in Flash CS3
djverab [1.8K]

Answer:

Radial gradients radiate from a center focal point. Both can be edited for color, alpha, and position within a fill or stroke. You can add up to 16 colors to a gradient, precisely control the location of the gradient focal point, and apply other parameters. A gradient behaves like any other fill or stroke.

8 0
2 years ago
What is the full form of flops​
kobusy [5.1K]

Answer:

<em>Floating Point Operations Per Second</em> (FLOPS)

Explanation:

<em>Floating Point Operations Per Second</em> (FLOPS) is a measure of a computer’s performance, especially in fields of scientific calculations that make heavy use of floating-point calculations. Floating-point operations include any operations that involve fractional numbers.

8 0
3 years ago
Read 2 more answers
Other questions:
  • Abram was asked to explain to one of his coworkers the XOR cipher. He showed his coworker an example of adding two bits, 1 and 1
    7·1 answer
  • This toolbar has icons representing the application's basic operations such as Save and Copy. Drawing Formatting Standard Task
    11·2 answers
  • Green field country is planning to conduct a cricket match between two teams A and B. a large crowd is expected in the stadium a
    6·1 answer
  • Users of an access point share the transmission capacity of the access point. The throughput a user gets is called the ________.
    11·1 answer
  • What is the effect of block size in cache design?
    12·1 answer
  • How to print wireless from laptop to samsung printer?
    6·2 answers
  • When you open a program, the hard drive
    7·1 answer
  • Which activity is the best example of a negative habit that may result from
    12·1 answer
  • Discuss TWO changes in ICMP that took place with the development of IPV6 and indicate why those changes were made.
    7·1 answer
  • Answer This One Question Right For Brainliest
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!