You
can evaluate the expression by placing the string in back ticks ``
HelloWorld.js
var x = 100; console.log(`Value of x is ${x}`) console.info(`Value of x is ${x}`) console.warn(`Value of x is ${x}`) console.error(`Value of x is ${x}`)
Output
Value of x is 100 Value of x is 100 Value of x is 100 Value of x is 100
No comments:
Post a Comment