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

Sveip for å vise menyen

book
Output Using Variables 2/2

Oppgave

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 desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 1. Kapittel 3

Spør AI

expand
ChatGPT

Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår

book
Output Using Variables 2/2

Oppgave

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 desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 1. Kapittel 3
Switch to desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Vi beklager at noe gikk galt. Hva skjedde?
some-alt