Created
August 25, 2020 09:09
-
-
Save gordey4doronin/148f60c80cfedbfaa3eb3031e433d24c to your computer and use it in GitHub Desktop.
Check the prototype of an object in JavaScript
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
var buffer = Buffer.from('something') | |
console.log('buffer.__proto__') | |
console.log(buffer.__proto__) | |
console.log() | |
console.log('buffer instanceof Buffer') | |
console.log(buffer instanceof Buffer) | |
console.log() | |
console.log('buffer.constructor') | |
console.log(buffer.constructor) | |
console.log() | |
console.log('buffer.constructor.name') | |
console.log(buffer.constructor.name) | |
console.log() | |
console.log('Object.getPrototypeOf(buffer)') | |
console.log(Object.getPrototypeOf(buffer)) | |
console.log() |
Author
gordey4doronin
commented
Aug 25, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment