sending information to the console
Posted: Tue Apr 23, 2024 6:37 pm
The console allows you to print and view JavaScript output. You can send information to the console using console.log(). For example, this code will print "Naomi" to the console:
Print the value of the character variable to the console. Then, click the "Console" button to view the JavaScript console.
The code above accesses the developer variable with its name in the console.log(). Note that the value between the parentheses is the value that will be printed.let developer = "Naomi";
console.log(developer);
Print the value of the character variable to the console. Then, click the "Console" button to view the JavaScript console.
let character = 'hello';
console.log(character)