1. 判断一个数是否为素数
Math.pow(N, 2)< n < Math.pow(N+1, 2)
1  | function is_Prime(n) {  | 
2. 是否有对应的括号, [[]] 返回true, [(()] 返回false;
用栈的数据结构去解
1  | function is_balance(str) {  | 
3. 输入 3[a]2[b]2[c], 输出 aaabbcc
1  | function printStr(str) {  | 
4. 多维数组 转 一维数组 数组中有3则删除,有两个3,将数组清空
1  | 
  | 
5. apply 或者 call 实现bind
1  | Function.prototype.bind = function(context) {  |