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 */};

原文地址:https://www.cnblogs.com/researcher/p/5496165.html