09 2017 档案

摘要:javascript function fn(arr) { return arr.reduce(function(prev,next){return prev 阅读全文
posted @ 2017-09-28 23:16 芒果夏夏 阅读(877) 评论(0) 推荐(0)
摘要:Given an n x n array, return the array elements arranged from outermost elements to the middle element, traveling clockwise. my answer forEach() 方法用于调 阅读全文
posted @ 2017-09-19 14:32 芒果夏夏 阅读(314) 评论(0) 推荐(0)
摘要:```javascript console.log(noRepeat([ 2, 1, 3, 4, 1, 2, 1, 5, 4])); //[4, 2, 1, 1, 2, 3, 5] console.log(noRepeat([ 14, 10, 13, 4, 21, 2, 1, 5, 4])); // 阅读全文
posted @ 2017-09-18 23:05 芒果夏夏 阅读(292) 评论(0) 推荐(0)
摘要:Eaxmple my answer javascript function minSecond(n) { var second_ = Math.floor(n%60); if (second_ 阅读全文
posted @ 2017-09-17 22:28 芒果夏夏 阅读(401) 评论(0) 推荐(1)
摘要:var a = document.getElementById("a"); 想获得left值 当css样式是内联的时候,JavaScript可以获得 a.style.left、a.offsetLeft 当css样式是外联的时候,JavaScript无法获得 a.style.left,只能获得 a.o 阅读全文
posted @ 2017-09-16 23:55 芒果夏夏 阅读(361) 评论(0) 推荐(0)
摘要:my answer 阅读全文
posted @ 2017-09-14 23:49 芒果夏夏 阅读(130) 评论(0) 推荐(0)
摘要:bootstrap的轮播图代码直接用不修改的话, 容易出现以下情况: 很多人的解决办法就是把图片宽度设置为100%,但如果仅仅只是将图片设置为100%,则容易出现如下情况,整个轮播图填充了大部分页面,有时候这并不是我们想要的效果 解决办法就是先让为整个轮播块添加居中属性:class=‘contain 阅读全文
posted @ 2017-09-13 09:23 芒果夏夏 阅读(3210) 评论(0) 推荐(1)
摘要:You are NOT allowed to use any temporary arrays or objects. You are also not allowed to use any or methods. my answer JavaScript function removeZeros( 阅读全文
posted @ 2017-09-12 20:08 芒果夏夏 阅读(369) 评论(0) 推荐(0)
摘要:Description: Write an algorithm that takes an array and moves all of the zeros to the end, preserving the order of the other elements. my answer: java 阅读全文
posted @ 2017-09-11 17:36 芒果夏夏 阅读(115) 评论(0) 推荐(0)
摘要:Complete the function/method so that it takes CamelCase string and returns the string in snake_case notation. Lowercase characters can be numbers. If 阅读全文
posted @ 2017-09-10 21:00 芒果夏夏 阅读(228) 评论(0) 推荐(0)
摘要:Complete the method/function so that it converts dash/underscore delimited words into camel casing. The first word within the output should be capital 阅读全文
posted @ 2017-09-09 15:35 芒果夏夏 阅读(295) 评论(0) 推荐(0)
摘要:如果我们想创建一个函数实例(传入参数为数组),为其原型对象添加我们自定义的方法,实现两个数组对象对应的项进行相加、相减等。那我们应该怎么做呢? 我们想得到如下的效果: my answer: javascript var Vector = function (components) { this.va 阅读全文
posted @ 2017-09-08 10:59 芒果夏夏 阅读(250) 评论(0) 推荐(0)
摘要:Description: Write a function that when given a URL as a string, parses out just the domain name and returns it as a string. For example: 使用正则解决该问题比较方 阅读全文
posted @ 2017-09-07 14:57 芒果夏夏 阅读(247) 评论(0) 推荐(1)
摘要:Description: Write a function called that takes a string of parentheses, and determines if the order of the parentheses is valid. should return true i 阅读全文
posted @ 2017-09-05 20:22 芒果夏夏 阅读(2201) 评论(0) 推荐(0)
摘要:用js实现多个目标移动,当鼠标移上去的时候改变宽度,鼠标移出去的时候变回原来宽度。 阅读全文
posted @ 2017-09-04 23:51 芒果夏夏 阅读(207) 评论(0) 推荐(0)
摘要:Description: My friend John and I are members of the "Fat to Fit Club (FFC)". John is worried because each month a list with the weights of members is 阅读全文
posted @ 2017-09-03 22:13 芒果夏夏 阅读(325) 评论(0) 推荐(1)
摘要:my answer 使用正则表达式: 空格也可以换成\s表示 阅读全文
posted @ 2017-09-02 17:04 芒果夏夏 阅读(589) 评论(0) 推荐(1)
摘要:Description: Move the first letter of each word to the end of it, then add 'ay' to the end of the word. my answer:使用正则 other answer: 阅读全文
posted @ 2017-09-02 14:01 芒果夏夏 阅读(129) 评论(0) 推荐(0)
摘要:Description: The number' '89' 'is the first integer with more than one digit that fulfills the property partially introduced in the title of this kata 阅读全文
posted @ 2017-09-01 11:26 芒果夏夏 阅读(217) 评论(0) 推荐(0)