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
<!-- title tags --> | |
<title itemprop="name">{{ .Title }} | {{ .Site.Title }}</title> | |
<meta property="og:title" content="{{ .Title }} | {{ .Site.Title }}" /> | |
<meta name="twitter:title" content="{{ .Title }} | {{ .Site.Title }}" /> | |
<meta itemprop="name" content="{{ .Title }} | {{ .Site.Title }}" /> | |
<meta name="application-name" content="{{ .Title }} | {{ .Site.Title }}" /> | |
<meta property="og:site_name" content="{{ .Site.Params.sitename }}" /> | |
<!-- description tags --> | |
<meta name="description" content="{{ .Description }} | {{ .Site.Params.description }}" /> | |
<meta itemprop="description" content="{{ .Description }} | {{ .Site.Params.description }}" /> |
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
13-01-2020 | |
- withRouter hoc to use for routing | |
- for active link use NavLink component | |
- <Switch> render on one component at time from <Router> | |
- <Ruter path="/post"> <Router path="/:id"> both renderred so use Switch for render only one, here post treaded as id | |
- |
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 trees = ["pine","apple","oak","maple","cherry"]; | |
delete trees[3]; | |
console.log(trees.length); |
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
const length = 4; | |
const numbers = []; | |
for (var i = 0; i < length; i++);{ | |
numbers.push(i + 1); | |
} | |
numbers; // => ??? |
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
const b = { | |
a: [1], | |
b: { | |
a: [2], | |
b: { | |
c: [3], | |
d: [4] | |
} | |
}, | |
c:'2', |
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
const arr = [10, 12, 15, 21]; | |
for (var i = 0; i < arr.length; i++) { | |
setTimeout(function() { | |
console.log(`The value ${arr[i]} is at index: ${i}`); | |
}, (i+1) * 1000); | |
} |
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
{ /* Original code */ | |
console.log(i); | |
var i = 10 | |
console.log(i); // 10 | |
} | |
{ /* Compilation phase */ | |
var i; | |
console.log(i); | |
i = 10 | |
console.log(i); // 10 |
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 outer() { | |
let a = 1; | |
function inner() { | |
let b = 2; | |
function innermost() { | |
let c = 3; | |
console.log(a, b, c); // 1 2 3 | |
} | |
innermost(); | |
console.log(a, b); // 1 2 — 'c' is not defined |
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
1 + "2" = "12" | |
"" + 1 + 0 = "10" | |
"" - 1 + 0 = -1 | |
"-9\n" + 5 = "-9\n5" | |
"-9\n" - 5 = -14 | |
"2" * "3" = 6 | |
4 + 5 + "px" = "9px" | |
"$" + 4 + 5 = "$45" | |
"4" - 2 = 2 | |
"4px" - 2 = NaN |
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
import { ofType } from 'redux-observable'; | |
import { map, switchMap, takeUntil } from 'rxjs/operators'; | |
import { Actions } from '../constants/action-constant'; | |
import { ajax } from 'rxjs/ajax'; | |
import { fetchNextRaceFulfill, onRaceListSuccess } from '../actions/racing-action'; | |
import apiConstant from '../constants/api-constant'; | |
import { Race, RaceData } from '../types/racing'; | |
export const fetchNextToRaceEpic = (action$: any) => action$.pipe( | |
ofType(Actions.FETCH_NEXT_RACE), |
NewerOlder