The sayHiTo
function is working correctly, however the doctorize
function's ${variable}
is not recognized.
function caculateBill(billAmount, taxRate) {
console.log('Running Calculate Bill');
const total = billAmount * (1 + taxRate);
return total;
}
// Function call. on **Run**
const myTotal = caculateBill(100, 0.13);
const myTotal2 = caculateBill(200, 0.13);
console.log(myTotal, myTotal2);
function sayHiTo(firstName) {
return `Hello ${firstName}`;
}
function doctorize(name) {
return 'Dr.${name}';
}
console.log(doctorize('dasol'));
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<link rel="stylesheet" href="../../base.css" />
</head>
<body>
<script src="./cf.js"></script>
</body>
</html>