Numbers

by Amy L

HTML

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<div class="jumbotron">
  <h2>Exercise 1</h2>
  <p>Write a function that takes an Array of values and returns another Array containing <em>only the unique values</em> (without duplicates). <br />E.g.</p>
  <pre>[1,1,2,2,3] => [1,2,3]</pre>
</div>

<div class="jumbotron">
  <h2>Exercise 2</h2>
  <p>Write a function that takes an Array numbers and returns the <em>highest</em> and <em>lowest numbers</em>. <br />E.g.</p>
  <pre>[3,1,2,1,5] => highest is 5 and lowest value is 1</pre>
</div>

JavaScript

// EXERCISE 1:
var inputForExerciseOne = [1, 1, 2, 2, 3];
// TODO: Implement solution



//===========================================================================
// EXERCISE 2:
var inputForExerciseTwo = [3, 1, 2, 1, 5];
// TODO: Implement solution