多项选择题
function foo({x, y = 5}) { console.log(x, y);}能够正确匹配的选项是()
A.foo({})//undefined,5
B.foo({x:1})//1,5
C.foo()//undefined,5
D.foo({x:1,y:2})//1,2
点击查看答案

多项选择题
A.foo({})//undefined,5
B.foo({x:1})//1,5
C.foo()//undefined,5
D.foo({x:1,y:2})//1,2
微信扫一扫,加关注免费搜题