This commit is contained in:
Philippe Torrel
2026-11-02 11:17:53 +01:00
parent 7936f3387b
commit c936a7f00c
12 changed files with 648 additions and 0 deletions
+30
View File
@@ -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');
}