• 基础面试题总结1


    介绍sass:

        定义变量css嵌套,允许在代码中使用算式,支持if判断以及for循环

    link和@import的区别:

       1. link属于html标签,而@import是css提供的

       2. 页面被加载时,link会同时被加载,而@import被引用的css会等到引用它的CSS文件被加载完再加载

       3. import只在IE5以上才能识别,而link是HTML标签,无兼容问题;

       4. link方式的样式的权重 高于@import的权重.

    求以下的输出内容是?

    var fun = function(){
        this.name = 'peter';
        return {
        name: 'jack'
        };
    }
    var p = new fun();
    console.log(p.name); // jack
     
    
    var fun = function(){
        this.name = 'peter';
        return 'jack';    
     }
    var p = new fun();
    console.log(p.name); // peter
     
    
    var fun = function(){}
     
    fun.prototype = {
        info : {
        name : 'peter',
        age : 25
        }
    }
     
    var a = new fun();
    var b = new fun();
     
    a.info.name = 'jack';
    b.info.name = 'tom';
    console.log(a.info.name); // tom
    console.log(b.info.name); // tom
     
    
    var fun = function(){
        this.info = {
        name : 'peter',
        age : 25
        }
    }
    var a = new fun();
    var b = new fun();
    a.info.name = 'jack';
    b.info.name = 'tom';
    console.log(a.info.name); // jack
    console.log(b.info.name); // tom
     
    
    var fun = function(){}
    fun.prototype = {    
        name : 'peter',    
        age : 25    
    }
    var a = new fun();
    var b = new fun();
    a.name = 'jack';
    b.name = 'tom';
    console.log(a.name); // jack
    console.log(b.name); // tom
     
    
    var fun = function(){
        this.info = {
        name : 'peter',
        age : 25
        }
    }
    fun.prototype = {
        info : {
        name : 'peter',
        age : 25
        }
    }
    var a = new fun();
    var b = new fun();
    a.info.name = 'jack';
    b.info.name = 'tom'; 
    console.log(a.info.name); // jack
    console.log(b.info.name); // tom
  • 相关阅读:
    Java排序算法之归并排序
    Java多线程学习笔记(四)——Thread类中方法介绍
    大数据平台搭建:Hadoop
    np.arrange用法
    Pandas中DateFrame修改列名
    python .loc vs .iloc区别
    The categories of Reinforcement Learning 强化学习分类
    python3.6安装总结
    梯度下降法与牛顿下降法速度的比较
    My SQL 和SQL Server区别
  • 原文地址:https://www.cnblogs.com/xiewangfei123/p/13900425.html
Copyright © 2020-2023  润新知