Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lära Output Using Variables 2/2 | Introduction
Introduction to JavaScript

Svep för att visa menyn

book
Output Using Variables 2/2

Uppgift

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 ,.

Switch to desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 1. Kapitel 3

Fråga AI

expand
ChatGPT

Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal

book
Output Using Variables 2/2

Uppgift

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 ,.

Switch to desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 1. Kapitel 3
Switch to desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Vi beklagar att något gick fel. Vad hände?
some-alt