Reputation: 29
In my javascript program I've already declared the port variable, but it is not working when I use $port
inside console.log
function.
Here's the snapshot of my console.
Upvotes: 0
Views: 113
Reputation: 111506
Use backticks instead of single quotes:
console.log(`Text ${variable}`);
instead of:
console.log('Text ${variable}');
See:
Upvotes: 2