Inspired by National Geographic's Goldilocks Zone Visualization
name | mass | radius | hzd | |
---|---|---|---|---|
Kepler-9 d | 0.02 | 2 | -2.42 | |
PSR 1257 12 b | 0.02 | 0.31 | -2.31 | |
Kepler-37 b | 0.02 | 0.32 | -2.16 | |
Mercury | 0.06 | 0.38 | -1.71 | |
KIC-12557548 b | 0.1 | 0.85 | -2.26 | |
Mars | 0.11 | 0.53 | 0.5 | |
Kepler-62 c | 0.12 | 0.54 | -2.01 | |
Kepler-42 d | 0.14 | 0.57 | -1.72 | |
KOI-82 d | 0.26 | 0.69 | -2.14 |
-
Write a function called
billTotal
that can be used to calculate the total to be paid at a restaurant -- including tip and tax -- given the subtotal (i.e. cost of food and drinks). We can assume that the tip will be 15% and tax will be 9.5%. Make sure that the tip does not include the tax! -
Complete the below function called
range
that takes two integers as parameters,start
andend
, and returns an array containing all the whole numbers between them starting withstart
and up toend
(you can use a any loop. The function
You are managing a sales team and you are interested is analyzing some data related to their age and total sales. Take a moment to review the following data structure you will be analyzing:
var salesTeam = [{name: {first: 'Aleen', last: 'Atkins'}, age: 26, sales: '$2314'},
{name: {first: 'Alvaro', last: 'Angelos'}, age: 55, sales: '$1668'},
{name: {first: 'Denese', last: 'Dossett'}, age: 29, sales: '$9248'},
- In the console or repl.it, try the following and verify
-
Write a function called
average
that takes an array of numbers as a parameter and returns the average of those numbers.After you write your function, you can test it using the above inputs to make sure that it behaves correctly.
-
Write a function called
min
that finds the smallest number in an array of numbers.