base: bj
岗位: 前端开发
var a = 1; var obj = { a: 2, console() { function fn() { console.log(this.a); } fn(); } }; obj.console(); // 问输出什么?
const App = () => { const { data, error, loading } = useRequest('/service/data'); if (loading) { return <Loading />; } else if (error) { return <Error />; } else { return <Data />; } };
function fn(arr, value) { // write code here } // test: console.log(fn([1, 2, 3, 3, 3, 3, 4, 5], 3)); // 4 console.log(fn([1, 2, 3, 3, 3, 3, 4, 5], 5)); // 1 console.log(fn([1, 2, 3, 3, 3, 3, 4, 5], 10)); // 0#软件开发2023笔面经#