|
| 1 | +// Do not change any of the funcxtion names |
| 2 | + |
| 3 | +const multiplyByTen = (num) => { |
| 4 | + // return num after multiplying it by ten |
| 5 | + // code here |
| 6 | +}; |
| 7 | + |
| 8 | +const subtractFive = (num) => { |
| 9 | + // return num after subtracting five |
| 10 | + // code here |
| 11 | +}; |
| 12 | + |
| 13 | +const areSameLength = (str1, str2) => { |
| 14 | + // return true if the two strings have the same length |
| 15 | + // otherwise return false |
| 16 | + // code here |
| 17 | +}; |
| 18 | + |
| 19 | +const areEqual = (x, y) => { |
| 20 | + // return true if x and y are the same |
| 21 | + // otherwise return false |
| 22 | + // code here |
| 23 | +}; |
| 24 | + |
| 25 | +const lessThanNinety = (num) => { |
| 26 | + // return true if num is less than ninety |
| 27 | + // otherwise return false |
| 28 | + // code here |
| 29 | +}; |
| 30 | + |
| 31 | +const greaterThanFifty = (num) => { |
| 32 | + // return true if num is greater than fifty |
| 33 | + // otherwise return false |
| 34 | + // code here |
| 35 | +}; |
| 36 | + |
| 37 | +const add = (x, y) => { |
| 38 | + // add x and y together and return the value |
| 39 | + // code here |
| 40 | +}; |
| 41 | + |
| 42 | +const subtract = (x, y) => { |
| 43 | + // subtract y from x and return the value |
| 44 | + // code here |
| 45 | +}; |
| 46 | + |
| 47 | +const divide = (x, y) => { |
| 48 | + // divide x by y and return the value |
| 49 | + // code here |
| 50 | +}; |
| 51 | + |
| 52 | +const multiply = (x, y) => { |
| 53 | + // multiply x by y and return the value |
| 54 | + // code here |
| 55 | +}; |
| 56 | + |
| 57 | +const getRemainder = (x, y) => { |
| 58 | + // return the remainder from dividing x by y |
| 59 | + // code here |
| 60 | +}; |
| 61 | + |
| 62 | +const isEven = (num) => { |
| 63 | + // return true if num is even |
| 64 | + // otherwise return false |
| 65 | + // code here |
| 66 | +}; |
| 67 | + |
| 68 | +const isOdd = (num) => { |
| 69 | + // return true if num is false |
| 70 | + // otherwise return false |
| 71 | + // code here |
| 72 | +}; |
| 73 | + |
| 74 | +const square = (num) => { |
| 75 | + // square num and return the new value |
| 76 | + // code here |
| 77 | +}; |
| 78 | + |
| 79 | +const cube = (num) => { |
| 80 | + // cube num and return the new value |
| 81 | + // code here |
| 82 | +}; |
| 83 | + |
| 84 | +const raiseToPower = (num, exponent) => { |
| 85 | + // raise num to whatever power is passed in as exponent |
| 86 | + // code here |
| 87 | +}; |
| 88 | + |
| 89 | +const roundNumber = (num) => { |
| 90 | + // round num and return it |
| 91 | + // code here |
| 92 | +}; |
| 93 | + |
| 94 | +const roundUp = (num) => { |
| 95 | + // round num up and return it |
| 96 | + // code here |
| 97 | +}; |
| 98 | + |
| 99 | +const addExclamationPoint = (str) => { |
| 100 | + // add an exclamation point to the end of str and return the new string |
| 101 | + // 'hello world' -> 'hello world!' |
| 102 | + // code here |
| 103 | +}; |
| 104 | + |
| 105 | +const combineNames = (firstName, lastName) => { |
| 106 | + // return firstName and lastName combined as one string and separated by a space. |
| 107 | + // 'Lambda', 'School' -> 'Lambda School' |
| 108 | + // code here |
| 109 | +}; |
| 110 | + |
| 111 | +const getGreeting = (name) => { |
| 112 | + // Take the name string and concatenate other strings onto it so it takes the following form: |
| 113 | + // 'Sam' -> 'Hello Sam!' |
| 114 | + // code here |
| 115 | +}; |
| 116 | + |
| 117 | +// If you can't remember these area formulas then head over to Google or look at the test code. |
| 118 | + |
| 119 | +const getRectangleArea = (length, width) => { |
| 120 | + // return the area of the rectangle by using length and width |
| 121 | + // code here |
| 122 | +}; |
| 123 | + |
| 124 | +const getTriangleArea = (base, height) => { |
| 125 | + // return the area of the triangle by using base and height |
| 126 | + // code here |
| 127 | +}; |
| 128 | + |
| 129 | +const getCircleArea = (radius) => { |
| 130 | + // return the rounded area of the circle given the radius |
| 131 | + // code here |
| 132 | +}; |
| 133 | + |
| 134 | +const getRectangularPrismVolume = (length, width, height) => { |
| 135 | + // return the volume of the 3D rectangular prism given the length, width, and height |
| 136 | + // code here |
| 137 | +}; |
| 138 | + |
| 139 | +// Do not modify code below this line. |
| 140 | +// -------------------------------- |
| 141 | + |
| 142 | +module.exports = { |
| 143 | + multiplyByTen, |
| 144 | + subtractFive, |
| 145 | + areSameLength, |
| 146 | + areEqual, |
| 147 | + lessThanNinety, |
| 148 | + greaterThanFifty, |
| 149 | + add, |
| 150 | + subtract, |
| 151 | + divide, |
| 152 | + multiply, |
| 153 | + getRemainder, |
| 154 | + isEven, |
| 155 | + isOdd, |
| 156 | + square, |
| 157 | + cube, |
| 158 | + raiseToPower, |
| 159 | + roundNumber, |
| 160 | + roundUp, |
| 161 | + addExclamationPoint, |
| 162 | + combineNames, |
| 163 | + getGreeting, |
| 164 | + getRectangleArea, |
| 165 | + getTriangleArea, |
| 166 | + getCircleArea, |
| 167 | + getRectangularPrismVolume |
| 168 | +}; |
0 commit comments