Blogger Information
Blog 35
fans 0
comment 0
visits 16765
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
JS变量常量函数演示
手机用户311660634
Original
368 people have browsed it
  1. let name = '小明'
  2. // 变量声明
  3. const age = 40
  4. // 常量声明
  5. function user(name,age){
  6. return (name + '今年是'+ age + '岁')
  7. }
  8. console.log(user('小明', 44))
  9. // 命名函数
  10. const username = function (name,age){
  11. return (name + '今年是'+ age + '岁')
  12. }
  13. // 匿名函数
  14. username = (name,age)=> (name + '今年是'+ age + '岁')
  15. // 箭头函数
  16. username = (name,age)=> (name + '今年是'+ age + '岁')('晓东',45)
  17. // 立即执行
Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:
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