Tell us what’s happening:
I cannot pass test 11 even though my code appears to be doing what is asked. All other tests are passed. What am I missing?
test 11: My return will consist of the initNum
, initUnit
, returnNum
, returnUnit
, and string
spelling out units in the format '{initNum} {initial_Units} converts to {returnNum} {return_Units}'
with the result rounded to 5 decimals.
Your code so far
from the controller:
this.getString = function (initNum, initUnit, returnNum, returnUnit) {
let initial_Units = this.spellOutUnit(initUnit)
let return_Units = this.spellOutUnit(returnUnit)
let result = `${initNum} ${initial_Units} converts to ${returnNum} ${return_Units}`;
return result;
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.101 Safari/537.36
.
Challenge: Metric-Imperial Converter
Link to the challenge: