-
Notifications
You must be signed in to change notification settings - Fork 0
/
js
22 lines (15 loc) · 1.03 KB
/
js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Array/flatMap
[{"item":"123","COUNT(item)":"1"},{"item":"333","COUNT(item)":"2"},{"item":"999","COUNT(item)":"1"}].flatMap(a=> a['COUNT(item)']).reduce((a,b)=>Number(a)+Number(b))
https://learn.javascript.ru/let-const
js strange behavior
foo();
a();
function foo() {
console.log(3);
}
var a = function() {
console.log(2);
};
--------------------------------
http://latentflip.com/loupe/?code=JC5vbignYnV0dG9uJywgJ2NsaWNrJywgZnVuY3Rpb24gb25DbGljaygpIHsKICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gdGltZXIoKSB7CiAgICAgICAgY29uc29sZS5sb2coJ1lvdSBjbGlja2VkIHRoZSBidXR0b24hJyk7ICAgIAogICAgfSwgMjAwMCk7Cn0pOwoKY29uc29sZS5sb2coIkhpISIpOwoKc2V0VGltZW91dChmdW5jdGlvbiB0aW1lb3V0KCkgewogICAgY29uc29sZS5sb2coIkNsaWNrIHRoZSBidXR0b24hIik7Cn0sIDUwMDApOwoKY29uc29sZS5sb2coIldlbGNvbWUgdG8gbG91cGUuIik7!!!PGJ1dHRvbj5DbGljayBtZSE8L2J1dHRvbj4%3D - визуализация евент луп
https://developer.mozilla.org/ru/docs/Games/Tutorials/2D_Breakout_game_pure_JavaScript - Арканоид