Challenge: Simple Function
Oppgave
Swipe to start coding
Write a function called messageFunc that, when called, should print the text "This is a message from the function" to the console.
- Define a function called
messageFunc. - Inside the
messageFuncfunction, use theconsole.logstatement to output the given text. - Call the
messageFuncfunction in the end.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 1. Kapittel 46
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Fantastisk!
Completion rate forbedret til 1.33
Challenge: Simple Function
Sveip for å vise menyen
Oppgave
Swipe to start coding
Write a function called messageFunc that, when called, should print the text "This is a message from the function" to the console.
- Define a function called
messageFunc. - Inside the
messageFuncfunction, use theconsole.logstatement to output the given text. - Call the
messageFuncfunction in the end.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 1. Kapittel 46
single