From 1224b9325f6ccaa549f4b7620a91ad78d6d24bbb Mon Sep 17 00:00:00 2001 From: Khalil <578755492@qq.com> Date: Thu, 31 Mar 2016 20:51:35 +0800 Subject: [PATCH 1/5] first --- practice/xny/1/1.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 practice/xny/1/1.js diff --git a/practice/xny/1/1.js b/practice/xny/1/1.js new file mode 100644 index 0000000..e6903e8 --- /dev/null +++ b/practice/xny/1/1.js @@ -0,0 +1,7 @@ +/** + * Created by Khalil on 2016/3/31. + */ +var txt = parseInt('123',10); +alert(txt) + +//text.parseint() \ No newline at end of file From 92da2ce555c2105cc2b7e411aa22798db7b2a2cf Mon Sep 17 00:00:00 2001 From: Khalil <578755492@qq.com> Date: Mon, 4 Apr 2016 17:21:54 +0800 Subject: [PATCH 2/5] =?UTF-8?q?first=20homework=20from=20=E8=B0=A2?= =?UTF-8?q?=E6=9F=A0=E5=AE=87=20and=20=E5=88=98=E5=AE=B6=E6=97=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- practice/xny/1/1.js | 7 ------- practice/xny/1/Thinking liujiawang.txt | 7 +++++++ practice/xny/1/Thinking xieninyu.txt | 3 +++ practice/xny/1/answer1.js | 17 +++++++++++++++++ practice/xny/1/answer2.js | 9 +++++++++ practice/xny/1/answer3.js | 7 +++++++ practice/xny/1/answer4.js | 9 +++++++++ practice/xny/1/answer5.js | 8 ++++++++ practice/xny/1/answer6.js | 12 ++++++++++++ practice/xny/1/answer7.js | 7 +++++++ practice/xny/1/answer8.js | 15 +++++++++++++++ 11 files changed, 94 insertions(+), 7 deletions(-) delete mode 100644 practice/xny/1/1.js create mode 100644 practice/xny/1/Thinking liujiawang.txt create mode 100644 practice/xny/1/Thinking xieninyu.txt create mode 100644 practice/xny/1/answer1.js create mode 100644 practice/xny/1/answer2.js create mode 100644 practice/xny/1/answer3.js create mode 100644 practice/xny/1/answer4.js create mode 100644 practice/xny/1/answer5.js create mode 100644 practice/xny/1/answer6.js create mode 100644 practice/xny/1/answer7.js create mode 100644 practice/xny/1/answer8.js diff --git a/practice/xny/1/1.js b/practice/xny/1/1.js deleted file mode 100644 index e6903e8..0000000 --- a/practice/xny/1/1.js +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Created by Khalil on 2016/3/31. - */ -var txt = parseInt('123',10); -alert(txt) - -//text.parseint() \ No newline at end of file diff --git a/practice/xny/1/Thinking liujiawang.txt b/practice/xny/1/Thinking liujiawang.txt new file mode 100644 index 0000000..6901b93 --- /dev/null +++ b/practice/xny/1/Thinking liujiawang.txt @@ -0,0 +1,7 @@ +#前端学习课程1感想 +##感觉这并不是老师你要求的那个markdown 所以我觉得我加的这些##号看起来和智障一样。 +###其实报班之前挺忐忑的,无悬念9个人中基础最差的我,也是赶鸭子上架,可能先学一下css html js打好基础再来学习会更好,可是又觉得这样的机会挺难得的,没法错过,所以硬着头皮来听课 +###第一节课听紧张的,看那些东西都是一脸懵逼,要是再被提问还不会,那特么就比较尴尬了 +###不过大神们讲的很细很慢,思维还能跟得上,没出现那种一言不合就开快车的情况,听欣慰了 +###关于这次作业的话。。。清明出去玩了四天。。。作业也是压着deadline。。。全靠队友carry,我还在看他的代码。。。 +####最后还是感谢大神们提供这么好的学习机会,希望下次的感想我扯得是些关于代码的问题。。。康桑米达。。。 \ No newline at end of file diff --git a/practice/xny/1/Thinking xieninyu.txt b/practice/xny/1/Thinking xieninyu.txt new file mode 100644 index 0000000..a6df2d8 --- /dev/null +++ b/practice/xny/1/Thinking xieninyu.txt @@ -0,0 +1,3 @@ +深复制和浅复制的一点疑问,深复制是对对象的所有属性进行遍历直到出现出现基本类型再直接复制过来,然后基本类型是储存在栈中, +对于对象,栈中储存的是对象名和地址,然后储存的内容是存放在堆中,当进行深复制时,通过栈中储存的地址进入到堆中,遍历所有 +属性然后直到出现基本属性,那是不是深复制后的都是储存在栈中..堆中储存的是像树那样的子类和父类的关系么。。。 \ No newline at end of file diff --git a/practice/xny/1/answer1.js b/practice/xny/1/answer1.js new file mode 100644 index 0000000..bee07df --- /dev/null +++ b/practice/xny/1/answer1.js @@ -0,0 +1,17 @@ +/** + * Created by admin on 2016/9/6. + */ +var str1 = "123" +var answer1 = parseInt(str1) +console.log(str1) +console.log(answer1); + + + + + + + + + + diff --git a/practice/xny/1/answer2.js b/practice/xny/1/answer2.js new file mode 100644 index 0000000..4555996 --- /dev/null +++ b/practice/xny/1/answer2.js @@ -0,0 +1,9 @@ +/** + * Created by Khalil on 2016/4/4. + */ +var array = ['1','2','1','3','4'] +var answer2 = array.map(function (num) { + return Number(num) +}) +console.log(array); +console.log(answer2); \ No newline at end of file diff --git a/practice/xny/1/answer3.js b/practice/xny/1/answer3.js new file mode 100644 index 0000000..e9d22e1 --- /dev/null +++ b/practice/xny/1/answer3.js @@ -0,0 +1,7 @@ +/** + * Created by Khalil on 2016/4/4. + */ + +//var childCollection = document.querySelectorAll('div'); +//TODO:将集合转化为真正的数组 +//var childs = Array.call(childCollection) \ No newline at end of file diff --git a/practice/xny/1/answer4.js b/practice/xny/1/answer4.js new file mode 100644 index 0000000..5fab4b8 --- /dev/null +++ b/practice/xny/1/answer4.js @@ -0,0 +1,9 @@ +/** + * Created by Khalil on 2016/4/4. + */ +function spacify(str) { + var newStr = str.replace(/ /,'').split(''); + return newStr.join(' ') +} +var answer4 = spacify('hello world') +console.log(answer4); diff --git a/practice/xny/1/answer5.js b/practice/xny/1/answer5.js new file mode 100644 index 0000000..4b90ad9 --- /dev/null +++ b/practice/xny/1/answer5.js @@ -0,0 +1,8 @@ +/** + * Created by Khalil on 2016/4/4. + */ +function Convension(str) { + var tmp = str.split('').sort() + return tmp.join('') +} +console.log(Convension('dsadafafasfdg')) \ No newline at end of file diff --git a/practice/xny/1/answer6.js b/practice/xny/1/answer6.js new file mode 100644 index 0000000..799106f --- /dev/null +++ b/practice/xny/1/answer6.js @@ -0,0 +1,12 @@ +/** + * Created by Khalil on 2016/4/4. + */ +function Logbytime(arr) { + var a = ['a', 'b', 'c', 'd'] + for(var i = 0; i < a.length;i++) + { + (function(j){setTimeout(function(){console.log(a[j]);}, j * 1000);})(i); + //var t = setTimeout(function(){console.log(a[i]);}, 1000); + } +} +var answer6 = Logbytime(); \ No newline at end of file diff --git a/practice/xny/1/answer7.js b/practice/xny/1/answer7.js new file mode 100644 index 0000000..a7a3bf0 --- /dev/null +++ b/practice/xny/1/answer7.js @@ -0,0 +1,7 @@ +/** + * Created by Khalil on 2016/4/4. + */ + +function log() { + console.log.apply(console, arguments) +} diff --git a/practice/xny/1/answer8.js b/practice/xny/1/answer8.js new file mode 100644 index 0000000..dad95aa --- /dev/null +++ b/practice/xny/1/answer8.js @@ -0,0 +1,15 @@ +/** + * Created by Khalil on 2016/4/4. + */ +var User = { + count:1, + + getCount:function() { + return this.count; + } +}; + +console.log(User.getCount());// 1 + +var func = User.getCount(); +console.log(func());//报错 func is not a function this这里指向的是func不是user 所以func中没有count \ No newline at end of file From c5ae37d74c6c168782dd1f16bcb678832639061a Mon Sep 17 00:00:00 2001 From: Khalil <578755492@qq.com> Date: Wed, 6 Apr 2016 22:15:57 +0800 Subject: [PATCH 3/5] =?UTF-8?q?second=20homework=20from=20=E8=B0=A2?= =?UTF-8?q?=E6=9F=A0=E5=AE=87=20and=20=E5=88=98=E5=AE=B6=E6=97=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- practice/xny/1/answer1.js | 3 - practice/xny/1/try.js | 7 ++ practice/xny/2/code2.html | 19 +++++ practice/xny/2/tee.js | 99 +++++++++++++++++++++++++++ practice/xny/2/thinking2 liujiawang | 0 5 files changed, 125 insertions(+), 3 deletions(-) create mode 100644 practice/xny/1/try.js create mode 100644 practice/xny/2/code2.html create mode 100644 practice/xny/2/tee.js create mode 100644 practice/xny/2/thinking2 liujiawang diff --git a/practice/xny/1/answer1.js b/practice/xny/1/answer1.js index bee07df..820c72b 100644 --- a/practice/xny/1/answer1.js +++ b/practice/xny/1/answer1.js @@ -1,6 +1,3 @@ -/** - * Created by admin on 2016/9/6. - */ var str1 = "123" var answer1 = parseInt(str1) console.log(str1) diff --git a/practice/xny/1/try.js b/practice/xny/1/try.js new file mode 100644 index 0000000..ae1622d --- /dev/null +++ b/practice/xny/1/try.js @@ -0,0 +1,7 @@ +/** + * Created by Khalil on 2016/4/4. + */ +var array = ['1','2','1','3','4'] +var answer2 = array.map(Number) +console.log(array); +console.log(answer2); \ No newline at end of file diff --git a/practice/xny/2/code2.html b/practice/xny/2/code2.html new file mode 100644 index 0000000..3658e15 --- /dev/null +++ b/practice/xny/2/code2.html @@ -0,0 +1,19 @@ + + +
+ +