Blogger Information
Blog 56
fans 0
comment 4
visits 37842
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
JS 字面量的简化,推荐使用
异乡客
Original
530 people have browsed it

  1. // 字面量的简化,推荐使用
  2. let name = "朱老师";
  3. let user = {
  4. // name:name,
  5. name,
  6. email: "25@qq.com",
  7. // getName:function(){
  8. // return this.name;
  9. // },
  10. getName (){
  11. return `${this.name}的&&&&&&&&&&邮箱是${this.email}`;
  12. },
  13. };
  14. console.log(`${user.name}的邮箱是${user.email} `);
  15. console.log(user.getName());
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post