Skip to content

Latest commit

 

History

History
executable file
·
9 lines (7 loc) · 675 Bytes

File metadata and controls

executable file
·
9 lines (7 loc) · 675 Bytes

Which of the following console.log() statements return "Welcome!"? <<

(x) console.log("Welcome!"); {{Correct because the statement prints "Welcome!" to the console with no syntax error.}} ( ) console.print("Welcome!"); {{Incorrect because "log" should be used instead of "print".}} ( ) console.log Welcome! {{Incorrect because the statement does not adhere to JavaScript syntax.}} ( ) console.log -> (Welcome!) {{Incorrect because the statement does not adhere to JavaScript syntax.}} ( ) console.log() {{Incorrect because the statement does not print anything to the console.}}

||The syntax of the console.log() method is shown in the sample code above. ||