CamelThunder CamelThunder
  • 16-03-2021
  • Computers and Technology
contestada

Which statement below returns 'soccer'?
sports = [2: football', 3:'soccer', 4:'volleyball', 5:'softball'}

• sports.find(soccer')
• sports[3]
• sports(3)
• sports.get(2)

Respuesta :

tonb
tonb tonb
  • 16-03-2021

Answer:

The answer is the second option.

sports = {2: 'football', 3:'soccer', 4:'volleyball', 5:'softball'};

console.log(sports[3]);

will output:

soccer

Explanation:

There were several syntax errors in the code (assuming it is javascript):

- Text strings must be enclosed in single or double quotes.

- sports is an object, not an array, so it should have { } and not [ ]

Answer Link

Otras preguntas

Evaluate the expression when a = –1.4 and b = –2.7.     |a| + b A.–1.3  B.–4.1   C.4.1  D.1.3Solve for x. A.x = 35  B. 9 2/7   C.x = 63 D. 31 1/2  Graph the sol
what is a sharp projecting edge of something?
Lee and his family are planning a hiking trip on the Appalachian Trail. They are packing food in 2-lb bundles. How many bundles can they make with 36 lb of food
y=-3x+55x - 4y= -3solvining systems of equations by substitution
what is the solution to the proportion? 9/x=4/12 Answers: A. 13 B. 27 C. 17 D. 3
what did a lord, knight, and serf do for each other?
What Was Maria Antoinette's Political Views ??
what is a sharp projecting edge of something?
What were the first-known inhabitants of massachusetts?
the strength of the force of gravity between two objects depend on?