Output Using Variables 2/2
Swipe to start coding
A variable named country has been given to you. Your task is, using the above variable, to print the statement My country is USA and I love my country in the console window using console.log
Løsning
Summary:
- The
console.log()in JavaScript is used to display output to the users. - JavaScript support both single-quotes as well as double-quotes.
- Variables can also be passed into the
console.log()and they have to be separated by a comma,.
Tak for dine kommentarer!
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat
Can you show an example of using variables with console.log()?
What is the difference between using single and double quotes in JavaScript?
Are there other ways to display output in JavaScript besides console.log()?
Fantastisk!
Completion rate forbedret til 2
Output Using Variables 2/2
Stryg for at vise menuen
Swipe to start coding
A variable named country has been given to you. Your task is, using the above variable, to print the statement My country is USA and I love my country in the console window using console.log
Løsning
Summary:
- The
console.log()in JavaScript is used to display output to the users. - JavaScript support both single-quotes as well as double-quotes.
- Variables can also be passed into the
console.log()and they have to be separated by a comma,.
Tak for dine kommentarer!
single