用户:
莫语~【墨】查看:0 回复:1 评论:0 创建时间:2021-10-01T18:03:25
function howToDo(name) { if (name == 'apple') { return `eat ${name}`; } else if (name == 'juice') { return `drink ${name}`; } else { return 'do nothing'; } } console.log(howToDo('apple')); // eat apple console.log(howToDo('juice')); // drink juice console.log(howToDo('bug')); // do nothing console.log(howToDo('school')); // do nothing 如何解答?