Signup/Sign In

Answers

All questions must be answered. Here are the Answers given by this user in the Forum.

Nope its not working!!!
2 years ago
1. Create a global variable named a using let keyword and give value "Hello" to it.
2. Then, create a local variable named b using let keyword within the function body of greeting() function and give value "Studytonight" to it.
3. Click on the Run and you should get an exception in the output.

/* Add global variable a here*/
let a = "Hello";

function greeting() {
/* Add the local variable here*/
let b = "Studytonight";

console.log(`${a} ${b}`);
}
greeting();
console.log(a + b);

The compiler is showing try again. Please someone help me to find the error.
2 years ago
The compiler is showing try again..........
2 years ago
no it's not working. Console panel is showing try again even though my code is correct.
2 years ago
Still its not working
2 years ago
let str1 = `Studytonight`;
let str2 = String("Studytonight");

// write code here

console.log(str1);
console.log(str2);


error showing that "Assign value to variable str2"
2 years ago