Inline Function

refactorgram

function getRating(driver) {
  return moreThanFiveLateDeliveries(driver) ? 2 : 1;
}

function moreThanFiveLateDeliveries(driver) {
  return driver.numberOfLateDeliveries > 5;
}

image/svg+xml

function getRating(driver) {
  return (driver.numberOfLateDeliveries > 5) ? 2 : 1;
}

inverse of Extract Function

aliases Inline Method