@kangax created a new interesting quiz, this time devoted to ES6 (aka ES2015). I found this quiz very interesting and quite hard (made myself 3 mistakes on first pass).
Here we go with the explanations:
(function(x, f = () => x) {
@kangax created a new interesting quiz, this time devoted to ES6 (aka ES2015). I found this quiz very interesting and quite hard (made myself 3 mistakes on first pass).
Here we go with the explanations:
(function(x, f = () => x) {
Effective September 2021, Dropbox will be deprecating long-lived access tokens.
This GIST generally describes how to authenticate requests to Dropbox API v2, for anyone working on a server-side PHP Dropbox implementation.
It's important to understand three types of codes you'll encounter:
For faster connection speed and more flexibility.
/Applications/Xcode.app/Contents/MacOS/Xcode
const { | |
getChange | |
} = require('./getChange'); | |
const assert = require('assert'); | |
const TESTS = [{ | |
dealDetails: [1, 1], | |
change: [0, 0, 0, 0, 0, 0] | |
}, | |
{ |
const { | |
buildSquareStr | |
} = require('./buildSquareStr'); | |
const assert = require('assert'); | |
const SQUARES = { | |
1: `■`, | |
3: [`□□□`, `□■□`, `□□□`].join('\n'), | |
5: [`■■■■■`, `■□□□■`, `■□■□■`, `■□□□■`, `■■■■■`].join('\n'), | |
7: ['□□□□□□□', '□■■■■■□', '□■□□□■□', '□■□■□■□', '□■□□□■□', '□■■■■■□', '□□□□□□□'].join('\n'), |
// что возвращает эта функция? | |
(function fun(Infinity, length, __proto__) | |
{ | |
return [,,~0.[0|0]][fun.__proto__.length && Infinity, -~String(this).length >> __proto__] << (0. === .0) + Infinity; | |
}).apply(typeof fun, [,,2]); | |
// рассмотрим массив с аргументами: | |
// "0" in [,,2] => false | |
// "1" in [,,2] => false |
// Source http://www.thatjsdude.com/interview/js1.html | |
/* | |
|-------------------------------------------------------------------------- | |
| Log p() | |
|-------------------------------------------------------------------------- | |
| | |
*/ | |
var p = function(a) { |
##Офтоп
##Теория