${} not recognizing variables ex04

In ex04, ${} is not returning the value of variable and instead is just returning a string. image of code below.

57%20PM

returns:

Patricias-MacBook-Air:ljsthw Andrew$ node ex04.js
Name; Andrew Murray
Age: 29
Height ${feet} feet ${inches} inches.
Age * Height: 2175
Age * Feet: ${age * feet}

You are using single-quotes: '
You need to enclose with backticks: `
On a typical US keyboard, the backtick is the same key as tilde ~, just below the escape esc key.

6 Likes