Answers for "adjust() js"

0

adjust() js

const power = (base, exponent) => {
  let result = 1;
  for (let count = 0; count < exponent; count++) {
    result *= base;
  }
  return result;
};
Posted by: Guest on April-18-2020
0

adjust() js

const hummus = function(factor) {
  const ingredient = function(amount, unit, name) {
    let ingredientAmount = amount * factor;
    if (ingredientAmount > 1) {
      unit += "s";
    }
    console.log(`${ingredientAmount} ${unit} ${name}`);
  };
  ingredient(1, "can", "chickpeas");
  ingredient(0.25, "cup", "tahini");
  ingredient(0.25, "cup", "lemon juice");
  ingredient(1, "clove", "garlic");
  ingredient(2, "tablespoon", "olive oil");
  ingredient(0.5, "teaspoon", "cumin");
};
Posted by: Guest on April-18-2020
0

adjust() js

console.log("The future says:", future());

function future() {
  return "You'll never have flying cars";
}
Posted by: Guest on April-18-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language