搜索整理的面试题

1、js中使用replace正则匹配的方法去除字符串左空格
2、写出5个js字符串操作函数并注明功能
3、如何新建一个obj对象,可执行obj.a().b().a() // 原则上可无限调用
4、数组方法slice()和splice()的区别
5、 typeof null
typeof Symbol()
typeof undefined
6、 let a = 0;
if([]){
  a = a+1;
}
if([] == true){
  a = a+2;
}
if(![] === false){
  a = a+3;
}
console.log(a++ +' : '+ ++a)
7、如何解决vue首屏加载慢的问题
8、简述Vue中is、ref、key的特性
9、vue-cli如何创建自定义指令
10、如何解决不同浏览器的样式兼容性问题
11、简述如何防御CSFR
12、对于生命周期的理解
13、var arr = ['1', '2', '3'];
var r = arr.map(parseInt);
console.log(r);                   _________
var m = arr.map(x=>parseInt(x));
console.log(m);                  _________
14、填写该行输出内容
function Parent() {
    this.name = 'parent';
}
Parent.prototype.say = function () {
    console.log('say');
};
function Child(age) {
    Parent.call(this);
    this.age = age;
}
var p = new Parent();
p.say();                        _______
var c = new Child(12);
c.say();                        _______
15、function A() {
   this.name = 'a'
   this.color = ['green', 'yellow']
}
function B() {
  
}
B.prototype = new A()
var b1 = new B()
var b2 = new B()
b1.name = 'change'
b1.color.push('black')
console.log(b1.name)
console.log(b2.name)
console.log(b1.color)
console.log(b2.color)

 新增

1. 声明提升

2. 路由拦截器和接口拦截器

3. 两个组件使用vuex state的同一个参数,数据会同步,但vuex中的内容不会更改。vuex中数据修改的唯一途径就是通过mutations,actions只是异步获取数据,提交给mutations

转载于:https://www.cnblogs.com/yl179578605/p/10619217.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值