var number = 0.1 + 0.2; console.log(number);//打印结果是:0.30000000000000004 //转换成整数在计算 var number = (0.1*10 + 0.2*10) / 10; console.log(number);//打印结果是0.3 ...
分类:
Web程序 时间:
2021-02-19 13:21:11
阅读次数:
0
使用es6的新方法: const a = { a: 1, b: 2, c: 3, d: 4, } console.log(Object.keys(a)) console.log(Object.values(a)) ...
分类:
编程语言 时间:
2021-02-19 13:01:42
阅读次数:
0
//数组的拓展 DOM document object model 文档对象模型 // let div = document.getElementsByTagName('div') // HTMLCollection // console.log(div) // let div2 = documen ...
分类:
编程语言 时间:
2021-02-19 13:00:22
阅读次数:
0
参考开源项目:https://github.com/tomakita/Colorful.Console 首先通过NuGet安装Colorful.Console。 基本用法如下: using System; using System.Drawing; using Console = Colorful. ...
Stopwatch sw = new Stopwatch(); sw.Start(); //任务123 Console.WriteLine("{0, 4}ms",sw.Elapsed.TotalMilliseconds); ...
分类:
其他好文 时间:
2021-02-17 14:21:57
阅读次数:
0
vue.json { "Print to console": { "prefix": "vue", "body": [ "<template>", " <div>$0</div>", "</template>", "", "<script>", "export default {", " data ...
分类:
其他好文 时间:
2021-02-17 14:21:41
阅读次数:
0
恢复内容开始 1. css Less中文网 Less快速入门 webpack打包 2. JavaScript github链接 2.1. 调试 // 在浏览器的控制台打印变量 console.log(num); 2.2. 数据类型 Number // js不区分小数和整数 Number 123 // ...
分类:
其他好文 时间:
2021-02-17 14:06:07
阅读次数:
0
背景 Read the fucking source code! --By 鲁迅 A picture is worth a thousand words. --By 高尔基 说明: KVM版本:5.9.1 QEMU版本:5.0.0 工具:Source Insight 3.5, Visio 文章同步在 ...
分类:
系统相关 时间:
2021-02-16 12:27:04
阅读次数:
0
1. arguments为什么不是数组?如何证明? arguments 是没有数组的slice等方法的,所以不是Array类型的。 验证: function testargs(){ var arr=[1,2,3]; console.log(typeof arguments.slice); conso ...
分类:
编程语言 时间:
2021-02-16 12:13:02
阅读次数:
0
基础 axios.get('/user?ID=12345') .then(function (response) { // 成功 console.log(response); }) .catch(function (error) { // 失败 console.log(error); }) .the ...
分类:
移动开发 时间:
2021-02-15 12:39:12
阅读次数:
0