09 2017 档案
摘要:javascript function fn(arr) { return arr.reduce(function(prev,next){return prev
阅读全文
摘要:Given an n x n array, return the array elements arranged from outermost elements to the middle element, traveling clockwise. my answer forEach() 方法用于调
阅读全文
摘要:```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])); //
阅读全文
摘要:Eaxmple my answer javascript function minSecond(n) { var second_ = Math.floor(n%60); if (second_
阅读全文
摘要:var a = document.getElementById("a"); 想获得left值 当css样式是内联的时候,JavaScript可以获得 a.style.left、a.offsetLeft 当css样式是外联的时候,JavaScript无法获得 a.style.left,只能获得 a.o
阅读全文
摘要:bootstrap的轮播图代码直接用不修改的话, 容易出现以下情况: 很多人的解决办法就是把图片宽度设置为100%,但如果仅仅只是将图片设置为100%,则容易出现如下情况,整个轮播图填充了大部分页面,有时候这并不是我们想要的效果 解决办法就是先让为整个轮播块添加居中属性:class=‘contain
阅读全文
摘要: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(
阅读全文
摘要: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
阅读全文
摘要:Complete the function/method so that it takes CamelCase string and returns the string in snake_case notation. Lowercase characters can be numbers. If
阅读全文
摘要:Complete the method/function so that it converts dash/underscore delimited words into camel casing. The first word within the output should be capital
阅读全文
摘要:如果我们想创建一个函数实例(传入参数为数组),为其原型对象添加我们自定义的方法,实现两个数组对象对应的项进行相加、相减等。那我们应该怎么做呢? 我们想得到如下的效果: my answer: javascript var Vector = function (components) { this.va
阅读全文
摘要: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: 使用正则解决该问题比较方
阅读全文
摘要: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
阅读全文
摘要:用js实现多个目标移动,当鼠标移上去的时候改变宽度,鼠标移出去的时候变回原来宽度。
阅读全文
摘要: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
阅读全文
摘要:my answer 使用正则表达式: 空格也可以换成\s表示
阅读全文
摘要: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:
阅读全文
摘要: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
阅读全文