2013-10-24から1日間の記事一覧
function F (opt) { this.a = opt.a } function test (opt) { try { console.log(new F(opt)) } catch (err) { return console.error(err) } } test() // [TypeError: Cannot read property 'a' of undefined] test(null) // [TypeError: Cannot read proper…