Skip to content

Instantly share code, notes, and snippets.

function Click() {
this.handlers = []; // observers
}
Click.prototype = {
subscribe: (fn) => {
this.handlers.push(fn);
},
unsubscribe: (fn) => {
this.handlers = this.handlers.filter(...);
let a = 1;
let b = 2;
let c = a + b;
console.log('c = ', c);
//Output: c = 3
a = 2;
console.log('c = ', c);
//Output: c = 4
let a = 1;
let b = 2;
let c = a + b;
console.log('c = ', c);
//Output: c = 3
a = 2;
console.log('c = ', c);
//Output: c = 3
{
"name": "Chrome Extension React",
"version": "1.0",
"manifest_version": 2,
"browser_action": {
"default_popup": "index.html"
},
"content_security_policy": "script-src 'self' 'sha256-[YOUR_KEY_HERE]'; object-src 'self'"
}
{
"name": "Chrome Extension React",
"version": "1.0",
"manifest_version": 2,
"browser_action": {
"default_popup": "index.html"
}
}
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
import { Component } from '@angular/core';
declare const google: any;
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
title: string = 'medium articles';
<agm-map [latitude]="lat" [longitude]="lng" [zoom]="zoom" (mapReady)="setMapInstance($event)">
<agm-marker [latitude]="lat" [longitude]="lng"></agm-marker>
</agm-map>
{
"hash": "000000000000000000b57d57fc57e022fbebc6fbdee108095dcf1bfcdd68b4d5",
"ver": 536870912,
"prev_block": "0000000000000000034f2855c116b426305d82a54b29cceb32641da639aeef82",
"mrkl_root": "160ebb4ccf13cd61cdde124e661d6f93f693025ff8cc76baf6cb3de51c76b994",
"time": 1482003305,
"bits": 402885509,
"nonce": 1583068092,
"n_tx": 366,
"size": 125237,
{
//...
"web_accessible_resources": [
"images/*.png",
"style/double-rainbow.css",
"script/double-rainbow.js",
"script/main.js",
"templates/*"
],
//...