BYS推荐MS前端PhoneCall面试问题整理-1

1. SQL:

查出产品对应的销售数量,会用到2个表之间的连接:

select Products.ProductName, Sales.SalesAmount from Product left outter join Sales
where Productes.ProductId=Sales.ProductId order by Sales.SalesAmount desc

 

2. JS:

写一个函数对数组元素进行输入,中间加上空格:

for (var i=0; i<cars.length;i++)
{
document.write(cars[i]+"<br>");
}

 

3. JS:

用prototype对已有对象方法进行扩展:
String.prototype.Hello=function () {
return this.Appned
};

 

4. JS:

考察JS中||的特殊应用:

String.prototype.repeat = String.prototype.repeat || function(times) {/* code here */};

posted @ 2016-05-15 21:20  Researcher  阅读(132)  评论(0编辑  收藏  举报