1. var obj = {name:"cheng",age:20,sex:"男"}
    2. var {name,age,sex} = obj;
    3. console.log(name)
    4. function http({url,type="get",callback}){
    5. var data =20;
    6. console.log(url);
    7. console.log(type);
    8. callback(data)
    9. }
    10. http({
    11. url:"xxxx",
    12. callback:handleData
    13. })
    14. function handleData(res){
    15. console.log(res)
    16. }

    image.png