Created
June 16, 2020 03:43
-
-
Save djD-REK/6108ecbb9c688bcb67de9e4f3944507e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log($) // function() | |
console.log(typeof $) // "function" | |
console.log($()) // null | |
console.log(typeof $()) // "object" | |
try { | |
console.log($().jquery) | |
console.log(typeof $().jquery) | |
} catch (e) { | |
console.log(e) | |
} // TypeError: "$() is null" | |
// In jQuery, $() is an alias of jQuery(): | |
try { | |
console.log(jQuery) | |
console.log(typeof jQuery) | |
console.log(jQuery()) | |
console.log(typeof jQuery()) | |
console.log(jQuery().jquery) | |
console.log(typeof jQuery().jquery) | |
} catch (e) { | |
console.log(e) | |
} // ReferenceError: "jQuery is not defined" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment