js arrow function return object
js arrow function return object
bug
filterData: {
type: Object,
default: () => {},
required: true,
},
OK
filterData: {
type: Object,
default: () => ({}),
required: true,
},
test
app = () => {};
() => {}
app();
undefined
app = (a) => {K: a};
(a) => {K: a}
app(x);
VM71221:1 Uncaught ReferenceError: x is not defined
at <anonymous>:1:5
(anonymous) @ VM71221:1
app(`x`);
undefined
x = app(`x`);
undefined
x;
undefined
app = (a) => ({K: a});
(a) => ({K: a})
x = app(`x`);
{K: "x"}
refs
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/14330499.html
未经授权禁止转载,违者必究!