<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>关键字赋值</title> </head> <body> <script> /*关键字赋值要点: 1.变量名需要是 obj 对象的键。 * */ let join = {distance: 49.96219482026539, azimuth: 258.83228435184736, reverseAzimuth: 258.8319272351422}; const {reverseAzimuth, distance, azimuth} = join; console.log("join:", join); console.log("distance:", distance); // distance: 49.96219482026539 console.log("azimuth:", azimuth); // azimuth: 258.83228435184736 </script> </body> </html>
05-09
1053
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)