30天程序语言研究

今天是30天程序语言研究的第二十三天,由於资料库开发的部分我是负责前端所以想说顺便多练习一下其他开发前端的语言,就选择了javascript当第二门语言。

网址:https://www.youtube.com/watch?v=yZwlW5INhgk&ab_channel=GrandmaCan-%E6%88%91%E9%98%BF%E5%AC%A4%E9%83%BD%E6%9C%83

今天主要是如何使用数字和数字的用法

笔记:

如何使用数字,数字的用法

document.write(-6.2374);
document.write(2+3*5);//一样有先乘除後加减
document.write((2+3)5);
var number = 6
document.write((2+3) * number);
document.write(8%5);// %代表取余数 =3
document.write(Math.abs(number)); // 把number取绝对值
document.write(Math.max(29,35,58,88,999,215,number));//找最大值 =999
document.write(Math.min(29,35,58,88,999,215,number));//找最小值 =6
document.write(Math.round(2.5));//做四舍五入 =3
document.write(Math.pow(2,3));//次方 2的3次方= 8
document.write(Math.sqrt(36));//开根号 =6
document.write(Math.random());//给0~1随机一个数 ex 0.5299203225183229
document.write(Math.round(Math.random() * 10));//想要得到0~10就
10,要整数就用round


<<:  30天程序语言研究

>>:  30天程序语言研究

#19数据上的各种距离(4)

tags: tags: 2021IT 杰卡德相似系数(Jaccard Similarity Coef...

MLOps在金融产业: 4个步骤建立安全ML环境

在前面的MLOps在金融产业:常见案例与工作流程文章当中,曾经提到,在金融业当中的MLOps可带来的...

【day5】二林&员林特色小吃

疫情前期看到千千拍摄《我们回家吧》系列 刚好跟男友回员林 所以就照着千千的推荐名单走一次罗 阳光老店...

Day 28【Deploy NFT - Deploy the Lazy Mint in Website】Vitalik Buterin mining Ethereum

// Thats proof of work 【前言】 今天终於来到这个 Project 测试的最...

DAY17 - 档案处理 - 不只是副档名检查!真正的检查档案格式

通常上传档案时,严谨一点,可能会需要做「档案格式检查」。 白话一点说,就是使用者上传的档案有没有符合...