Mersimoy G.

asked • 10/11/19

I stick with this question to write a code if you help me I'm happy

Light travels at 3 × 108 meters per second. A light-year is the distance a light beam travels in one year.

Write a program that calculates and displays the value of a light-year.

Useful facts:

  1. Seconds in a year = 365×24×602
  2. Rate = 3×108 meters per second


1 Expert Answer

By:

Fernando Z.

tutor
The weird looking regex strings are just to format the number with commas. JavaScript does not have an easy way to add commas.
Report

10/11/19

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.