Created using fixed length
var a = new Array(200)
a[50] = {}
Resized using length
.grid { | |
display: flex; | |
flex-direction: row; | |
flex-wrap: wrap; | |
} | |
.grid-col--auto, | |
.grid-col--1, | |
.grid-col--2, | |
.grid-col--3, |
class Listener { | |
constructor(fn, ctx) { | |
this.fn = fn | |
this.ctx = ctx | |
} | |
} | |
class Emitter { | |
listen(fn, ctx) { | |
this.listeners.push(new Listener(fn, ctx)) |
alias d8ir="d8 \ | |
--trace-hydrogen \ | |
--trace-phase=Z \ | |
--trace-deopt \ | |
--code-comments \ | |
--hydrogen-track-positions \ | |
--redirect-code-traces \ | |
--redirect-code-traces-to=code.asm" |
function Obj(x) { | |
if (typeof x !== 'number') throw new Error() | |
Object.defineProperty(this, 'x', {value: x}) | |
} | |
var a = new Obj(1) | |
var b = new Obj(2) | |
// Do `a` and `b` have the same hidden class in v8? | |
// |
// Curiosity #1 | |
// ------------ | |
function dart() { | |
this.x = 0; | |
delete this.x; | |
} | |
var A = new dart; |
export const READ_ONLY = 1 | |
export const DONT_ENUM = 2 | |
export const DONT_DELETE = 4 | |
export function InstallFunctions(object, attributes, functions) { | |
for (let i = 0; i < functions.length; i += 2) { | |
let field = functions[i] | |
let value = functions[i + 1] | |
AddNamedProperty(object, field, value, attributes) |
--- | |
parser: babel-eslint | |
ecmaFeatures: | |
modules: true | |
env: | |
es6: true | |
browser: true | |
node: true |
const ext = (...suffix) => new RegExp(`\\.(?:${ suffix.join('|') })(?:[?#].*)?$`) | |
const loaders = [ | |
// Traditional cases | |
{ test: ext('css'), loaders: ['style', 'css'] }, // single | |
{ test: ext('js', 'jsx', 'es6'), loaders: ['babel'] }, // multiple | |
// Complex case: Font-Awesome adds query strings and/or hashs to files | |
{ test: ext('otf', 'eot', 'svg', 'ttf', 'woff', 'woff2'), loaders: ['file?name=[name].[ext]'] }, | |
] |