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
[ | |
{ | |
"id": "26f6e289b3fab452", | |
"type": "tab", | |
"label": "Validate Certificate", | |
"disabled": false, | |
"info": "", | |
"env": [] | |
}, | |
{ |
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
GET / HTTP/1.1 | |
Host: www.google.com | |
Connection: keep-alive | |
Pragma: no-cache | |
Cache-Control: no-cache | |
Upgrade-Insecure-Requests: 1 | |
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36 | |
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9 | |
Accept-Encoding: gzip, deflate | |
Accept-Language: en-US,en;q=0.9 |
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
let name = 'Eamon'; | |
function printName() { | |
console.log(name); | |
} | |
printName(); // => 'Eamon' | |
name = 'Jack'; | |
printName(); // => 'Jack' |
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
class Grandfather { | |
constructor(name, age, job) { | |
this.name = name; | |
this.age = age; | |
this.job = job; | |
} | |
aboutMe() { | |
console.log(`I'm ${this.name}, I'm ${this.age} years old and I'm ${this.job === 'retired' ? '' : 'a '}${this.job}.`); | |
} |
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
function Grandfather(name, age, job) { | |
this.name = name; | |
this.age = age; | |
this.job = job; | |
} | |
Grandfather.prototype.aboutMe = function() { | |
console.log(`I'm ${this.name}, I'm ${this.age} years old and I'm ${this.job === 'retired' ? '' : 'a '}${this.job}.`); | |
}; |
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
function objectFactory() { | |
return { | |
property1: 'My first property', | |
property2: 'My second property', | |
printProperties() { | |
for (let prop in this) { | |
if (typeof this[prop] !== 'function') { | |
console.log(`${prop}: ${this[prop]}`); | |
} |
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
// This is a continuation of the previous code block | |
Object.prototype.test = `I'm a property of Object.prototype`; | |
console.log(Object.prototype); // [Object: null prototype] | |
// { test: "I'm a property of Object.prototype" } */ | |
console.log(Factory.prototype.test); // I'm a property of Object.prototype | |
console.log(Factory.prototype); // {} | |
console.log(descendant.test); // I'm a property of Object.prototype |
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
function Factory() { | |
this.foo = 1; | |
this.bar = 'string'; | |
} | |
let descendant = new Factory(); | |
console.log(Factory.prototype); // {} | |
console.log(Object.getPrototypeOf(Factory.prototype)); // [Object: null prototype] {} |
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
function Factory() { | |
this.foo = 1; | |
this.bar = 'string'; | |
} | |
Factory.prototype.example = "I'm a property of Factory.prototype"; | |
console.log(Factory.prototype); // { example: "I'm a property of Factory.prototype" } | |
let descendant = new Factory(); | |
console.log(descendant); // Factory { foo: 1, bar: 'string' } |
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
function Factory() { | |
this.foo = 1; | |
this.bar = 'string'; | |
} | |
let descendant = new Factory(); | |
console.log(descendant); // Factory { foo: 1, bar: 'string' } | |
console.log(Factory.prototype); // {} |
NewerOlder