Math()函数:

  1. x的y次方:Math.pow(x,y)
  2. 取小数点后两位:num.toFixed(2)

数据类型转换:

  1. 字符串转换为数字:parseInt(num)转换为整数;parseFloat(num)转换为浮点数;

     

相关文章:

  • 2021-10-16
  • 2021-10-16
  • 2022-01-12
猜你喜欢
  • 2019-09-30
  • 2022-12-23
  • 2021-10-16
  • 2022-12-23
  • 2021-10-16
  • 2022-12-23
  • 2021-12-07
相关资源
相似解决方案