This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
{
|
||||
const firstName = 'John';
|
||||
|
||||
// if (firstName === John) {
|
||||
// // ReferenceError: John is not defined
|
||||
// console.log(firstName);
|
||||
// }
|
||||
|
||||
// if (firstname === 'John') {
|
||||
// // Uncaught ReferenceError: firstname is not defined
|
||||
// console.log(firstName);
|
||||
// }
|
||||
|
||||
if (firstName === 'John') {
|
||||
console.log(firstName);
|
||||
}
|
||||
|
||||
function greet() {
|
||||
console.log('Hello, ' + fullName); // Cannot find name 'fullName'.
|
||||
console.log(typeof fullName);
|
||||
}
|
||||
|
||||
// greet(); // => ReferenceError: fullName is not defined
|
||||
|
||||
// function greet(fullName) {
|
||||
// console.log(`Hello, ${fullName}`);
|
||||
// }
|
||||
|
||||
greet('John Wick');
|
||||
}
|
||||
Reference in New Issue
Block a user