Skip to content

Instantly share code, notes, and snippets.

View silent-lad's full-sized avatar

Divyansh Tripathi silent-lad

View GitHub Profile
const puppeteer = require("puppeteer");
const chalk = require("chalk");
var fs = require("fs");
// MY OCD of colorful console.logs for debugging... IT HELPS
const error = chalk.bold.red;
const success = chalk.keyword("green");
(async () => {
try {
#!/usr/bin/env node
"use strict";
var inquirer = require("inquirer");
var chalk = require("chalk");
var response = chalk.bold.green;
var resume = require("./resume.json");
"repository": {
"type": "git",
"url": "git+https://github.com/silent-lad/silentlad.git"
},
"keywords": [
"resume",
"babyShark"
],
"license": "ISC",
"bugs": {
#!/usr/bin/env node
"use strict";
var inquirer = require("inquirer");
var chalk = require("chalk");
var response = chalk.bold.green;
var resume = require("./resume.json");
function that () {
console.log("Normal call");
console.log(this === window);
}
that();
console.log(this === window)
"use strict";
function that () {
console.log("Normal call");
console.log(this === window);
}
that();
function Those(init) {
this.is_a_preposition = init;
this.displayProperty = function() {
console.log(`Is those a preposition? : ${this.is_a_preposition}`);
}
}
let word = new Those("yes");
word.displayProperty(); //Prints :- Is those a preposition? : yes
function those () {
'use strict';
console.log("Strict function hence this is undefined,Or is it?")
console.log(this === window);
}
let confused = {
those: those,
these: function() {
console.log(this === window);
let confused = {
those: function() {
console.log(this === window);
},
these: ()=> {
console.log(this === window);
}
}
confused.those(); //False
function Preposition(name_init) {
this.name = name_init;
this.displayName = function() {
console.log(`Preposition is ${this.name}`);
}
}
let these = new Preposition("these");
these.displayName(); // Prints Preposition is these