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

Pyyhkäise näyttääksesi valikon

book
Output Using Variables 2/2

Tehtävä

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

Ratkaisu

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 desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 1. Luku 3
single

single

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

close

Awesome!

Completion rate improved to 2

book
Output Using Variables 2/2

Tehtävä

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

Ratkaisu

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 desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

close

Awesome!

Completion rate improved to 2

Pyyhkäise näyttääksesi valikon

some-alt