MO
Size: a a a
MO
AE
AP
AS
M
SS
const currentDate = '2019-11-11'
[
{
"_id": "5dcbd873b97a1d3cd0e60251",
"week": [
{
"_id": "5dcbd873b97a1d3cd0e60258",
"date": "2019-11-11",
"hour": 0,
"minut": 0
},
...точно также
},
{
"_id": "5dcbd873b97a1d3cd0e60251",
"week": [
{
"_id": "5dcbd873b97a1d3cd0e60258",
"date": "2019-05-12",
"hour": 0,
"minut": 0
},
...точно также
},
]
AE
C
function foo() {}
отличается от var foo = function() {}
?DV
const add = (a, b) => c => c === a + b;
const One = s => z => s (z)
const Two = s => z => s (s (z))
const Three = s => z => s (s (s (z)))
const toInt = n => n (x => x + 1) (0)
const Succ = n => (s => z => s (n (s) (z)))
const Add = n => m => m (Succ) (n)
toInt (Add (One) (Two)) === 3
AP
AP
AE
js hoisting
C
const currentDate = '2019-11-11'
[
{
"_id": "5dcbd873b97a1d3cd0e60251",
"week": [
{
"_id": "5dcbd873b97a1d3cd0e60258",
"date": "2019-11-11",
"hour": 0,
"minut": 0
},
...точно также
},
{
"_id": "5dcbd873b97a1d3cd0e60251",
"week": [
{
"_id": "5dcbd873b97a1d3cd0e60258",
"date": "2019-05-12",
"hour": 0,
"minut": 0
},
...точно также
},
]
SS
C
const idx = arr.findIndex(({ week }) => week.find(({ date }) => date === currentDate));
SS
V
C
M
C