Blogger Information
Blog 1
fans 0
comment 0
visits 266
Related recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
作业20230214
雪原
Original
266 people have browsed it
  1. let num1 = 0, num2 = 0, str1 = '';
  2. num1 = 2;
  3. num2 = num1 * 20;
  4. str1 = 'hello php.cn';
  5. console.log(num1, num2, str1);
  6. console.log('------------------');
  7. console.log(`${num1}`, typeof num1, `${num2}`, typeof num2, `${str1}`, typeof str1);
  8. const STR_ADDR = 'China';
  9. console.log(STR_ADDR, typeof STR_ADDR);
  10. console.log('------------------');
  11. // 函数类型1
  12. function add(a, b) {
  13. return a + b;
  14. }
  15. console.log(`${num1} add ${num2} = ` + add(num1, num2));
  16. // 函数类型2
  17. let add2 = function (a, b) {
  18. return a + b * 2;
  19. }
  20. console.log(`${num1} add2 ${num2} = ` + add2(num1, num2));
  21. //函数类型3
  22. let add3 = (a, b) => {
  23. return a + b * 3;
  24. }
  25. console.log(`${num1} add3 ${num2} = ` + add3(num1, num2));
  26. //函数类型4
  27. ((a, b) => {console.log(`${num1} add4 ${num2} = ` + (num1 + num2 * 4))}) (num1, num2);
  28. console.log('------------------');
  29. let varBoolean = (num1 > num2);
  30. console.log('varBoolean:'+varBoolean, typeof varBoolean);
  31. let varStr
  32. console.log('varStr:'+varStr, typeof varStr);
  33. console.log(null, typeof null);
  34. console.log('------------------');
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