![angelbabynn05](/avatars/28901.jpg)
angelbabynn05
06.07.2019 •
Computers and Technology
Function getlongeststring(strings) { } /* do not modify code below this line */ const strings = ['long', 'longer', 'longest']; console.log(getlongeststring(strings), '< -- should be "longest"');
Solved
Show answers
More tips
- H Health and Medicine What You Need to Know About Nasal Congestion in Infants: Causes, Symptoms, and Treatment...
- A Auto and Moto Mastering One-Movement Parking: All You Need to Know...
- P Photography and Videography Understanding HDR: How It Works and Why You Need It...
- P Photography and Videography How to Choose the Perfect Photo Paper for Your Images?...
- C Computers and Internet How to Choose an Uninterruptible Power Supply (UPS) for Your Computer: Expert Tips...
- S Science and Technology How to choose a home theater system?...
- A Auto and Moto How to Choose a Car Wash? Tips and Recommendations...
- A Animals and plants How ants survive winter: exploring the secrets of their winter life...
- C Construction and repair How to Choose the Best Underfloor Heating?...
- S Sport When is the Champions League final?...
Answers on questions: Computers and Technology
- M Mathematics Russell has collected 12 ties. If 2 out of every 3 ties are black with different colored stripes, how many black ties with different colored stripes does Russell own?...
- M Mathematics Each of the 4 walls in the dining room measures 12 5/8 feet. How much chair rail must be purchased to install the chair rail on all four walls. Disregard any openings....
- S Social Studies Which country is influenced by supply and demand? south Africa Nigeria Kenya all three If correct gets brainlest...
- M Mathematics When the transformation T 2,-1 is performed on point A, its image is point (-3.4). What are the coordinates of A? 1) (5,-5)2) (-5,5)3) (-1,3)4) (-6,-4)...
- E English Why did Madison believe that a pure democracy was not suitable as a model for a government of the United States? a. The U.S. population was too small. b. The population...
- M Mathematics You are reading a great novel that is 290 pages long. You can t renew the book, and you have only 12 days to finish it before returning it to the library. How many pages...
- E English The Valley of Ashes represent of the following EXCEPT A. hopes and dreams B. wasted lives C. greed D. moral decay...
- M Mathematics Please help me I’m in a hurry...
- M Mathematics The trees on two different plots of land are tested for disease. The results are shown in this table. Tree Plot Disease present? 1 А Y Enter numbers in the boxes so that...
- M Mathematics Identify the LIKE TERMS in the expression. −5x−3x+4+9x...
Ответ:
function getLongestString(strings) {
return strings.reduce( (acc, cur) => acc.length > cur.length ? acc : cur);
}
Explanation:
A reducer applies the same operation to each array element. In this case, the longest string is stored in the accumulator (acc), and is replaced only by the current element (cur) if the current element is longer than the accumulator.
Ответ:
Binary
Explanation: