Skip to content

Instantly share code, notes, and snippets.

const express = require('express')
const bodyParser = require('body-parser')
const uuidv4 = require('uuid/v4')
const app = express()
const images = {}
// This is middleware that lets you get the post body in your endpoint handlers below
app.use(bodyParser.json())

@kangax's ES6 quiz, explained

@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:

Question 1:
(function(x, f = () => x) {