注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
最近面了linkedin前端电面2次,估计第一次第二个题讨论了太长时间没问完,基本都是面经题,不多说直接上题。口头问题:
coding:
1. 看代码说结果,如何改正
- var Foo = function( a ) {
- function bar() {
- return a;
- }
- this.baz = function() {
- return a;
- };
- };
- Foo.prototype = {
- biz: function() {
- return a;
- }
- };
- var f = new Foo( 7 );
- f.bar(); // error, undefined function
- f.baz(); // 7
- f.biz(); // undefined
复制代码 2. 给你一个有参数url:"linkedin.com?q1=v1&q2=v2”写一个方返回{q1: 'v1', q2: 'v2'}, 要用到decodeURL(); 充内容 (2017-9-24 09:02):
口头问题贴掉了:
1. difference between GET and POST
2. difference between Class inheritance and prototype inheritance
3. difference between Promise and callback |