1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Julia

Exercise

Appending arrays

You are once again examining your run times. Since you last looked at these values, you have been on more runs. You have also realized that you made a mistake in recording your run times previously - you accidentally added the time of your last run twice.

You want to remove this duplicated value and add your new run times to the array.

The array of your previous run times, named runtimes, and the array of your new run times, named new_runtimes, are already defined for you.

Remember that functions that end with an ! modify their arguments. Other functions will not do this.

Instructions

100 XP
  • Use the pop!() function to remove the last value of the runtimes array to get rid of the duplicated value.
  • Use the append!() function to add your new run times to the runtimes array.