1. const arr = [1, 2, 3, 4]
    2. let [num1, num2, num3, num4] = arr
    3. console.log(num1, num2, num3, num4) // 1 2 3 4
    4. const obj = {
    5. name: '名字',
    6. age: '18',
    7. eat: function (food) {
    8. console.log('吃' + food)
    9. }
    10. }
    11. let { name, age, eat } = obj
    12. console.log(name, age, eat)
    13. /*
    14. * 名字 18 ƒ (food) {
    15. * console.log('吃' + food)
    16. * }
    17. */
    18. eat('水果') // 吃水果