From a775c658d4b0577b473daefaf2a8d145b812ba8c Mon Sep 17 00:00:00 2001
From: 沈斌 <23420800@qq.com>
Date: Tue, 31 Jan 2017 15:51:50 +0800
Subject: [PATCH] 解决forEach循环中无法取得全局变量值的问题
---
test.js | 22 +++++++++++++++++++---
1 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/test.js b/test.js
index b851f88..80c2cc4 100644
--- a/test.js
+++ b/test.js
@@ -236,6 +236,22 @@
//console.log(Math.floor(Math.random() * 3 + 1))
-var moment = require('moment');
-var current = moment().format('YYYY-MM-DD HH:mm:ss');
-console.log(current);
\ No newline at end of file
+// var moment = require('moment');
+// var current = moment().format('YYYY-MM-DD HH:mm:ss');
+// console.log(current);
+
+// var data = "5a0000010003accf23d4515f00000000000000000030003e198c00110814050300060034001400000004001f000301040200000000000000000003490056048c1f02000000000000000000000000003c5b";
+// console.log(data.length);
+
+// var moment = require('moment');
+// var a = {
+// data: {a:1, b:2},
+// time: moment().format('YYYY-MM-DD HH:mm:ss')
+// };
+// console.log(JSON.stringify(a));
+
+var a = 999;
+var b = parseInt(a / 256);
+var c = a % 256;
+console.log(b + " | " + c);
+console.log("0" + b)
\ No newline at end of file
--
Gitblit v1.8.0