Complete the code to declare a global variable named message with the value 'Hello'.
var [1] = 'Hello';
The global variable is named message. Using var message = 'Hello'; declares it globally.
Complete the code to log the global variable message to the console.
console.log([1]);console or log alone inside console.log().To print the value of the variable message, pass it directly to console.log without quotes.
Fix the error in the code to correctly declare a global constant named PI with value 3.14.
const [1] = 3.14;
JavaScript is case-sensitive. The constant name should be PI exactly to match the intended global constant.
Fill both blanks to create a global object user with properties name and age.
const user = { name: '[1]', age: [2] };The object user has name set to 'Alice' and age set to 30.
Fill all three blanks to create a global function greet that returns a greeting with the given name.
function [1]([2]) { return `Hello, [3]!`; }
The function is named greet, takes a parameter name, and returns a greeting using template literals with ${name}.