更多“简述null和undefined的区别?”相关问题
  • 第1题:

    sql server 2005中的nvarchar(MAX)和xml有什么区别

    通过:Connection.GetOleDbSchemaTable(System.Data.OleDb.OleDbSchemaGuid.Columns, new object[] { null, null, tableName, null });得到的两种数据类型的属性完全一致,有其它方法区分吗?


    char(max)在定义以后,系统就会给他分配很大的存储空间,必要的时候某一个盘的容量,不能被别的数据使用。而xml数据类型则是自动增长的,别的数据可以占有它未使用的空间。

    希望能帮到你,别忘了采纳我的答案哦,祝你生活愉快!


  • 第2题:

    在C#中,string str = null 与 string str = “” 请尽量使用文字或图象说明其中的区别。


    正确答案:
    答:string str = null 是不给他分配内存空间,而string str =  给它分配长度为空字符串的内存空间。

  • 第3题:

    HashMap和Hashtable正确的说法有()    

    • A、都属于Map接口的类
    • B、Hashtable 类不是同步的,HashMap类是同步的
    • C、Hashtable 类不允许 null 键和 null 值
    • D、HashMap 类允许null 键和null 值

    正确答案:A,C,D

  • 第4题:

    Javascript中,以下哪两个变量的值不是==:()。

    • A、var a=0 , b=-0;
    • B、var a=NaN , b=NaN;
    • C、var a=null , b=undefined;
    • D、var a=[] , b=false;

    正确答案:B

  • 第5题:

    undefined是原始类型的数据,下列对undefined的描述正确的是()。

    • A、undefined表示变量声明过但未被赋值,是所有未赋值变量的默认值
    • B、undefined不保存在变量本地
    • C、undefined一般用于主动释放指向对象的引用
    • D、undefined专门表示变量不再指向任何对象地址

    正确答案:A

  • 第6题:

    null和undefined的共同点是()。

    • A、都是原始类型数据
    • B、都是引用数据类型
    • C、值不保存在变量本地
    • D、值保存在变量本地

    正确答案:A,D

  • 第7题:

    console.log(foo);varfoo="foo!";console.log(foo);执行上面代码,控制台会输出()。

    • A、undefined undefined
    • B、foo! undefined
    • C、undefined foo!
    • D、foo! fool!

    正确答案:C

  • 第8题:

    You are modifying a table named Product in a SQL Server 2005 database. You want to add a new column named FriendlyName to the Product table. A friendly name for each product will be stored in this column. The table currently contains data. The sales department has not yet created a friendly name for each product. FriendlyName is a required value for each product. You want to add this new column by using the least amount of effort. What should you do?()

    • A、Define the new column as NULL.Update the FriendlyName column to the same value as the productName column. Alter the FriendlyName column to be NOT NULL.
    • B、Define the new column as NOT NULL with a default value of ’Undefined.’
    • C、Define the new column as NULL. Use application logic to enforce the data constraint.
    • D、Define the new column as NULL with a default value of ’Undefined.’

    正确答案:B

  • 第9题:

    问答题
    简述null和undefined的区别?

    正确答案: null是一个表示”无”的对象转为数值时为0;undefined是一个表示”无”的原始值,转为数值时为NaN。
    当声明的变量还未被初始化时,变量的默认值为undefined。
    null用来表示尚未存在的对象,常用来表示函数企图返回一个不存在的对象。
    undefined表示”缺少值”,就是此处应该有一个值,但是还没有定义。典型用法是:
    1.变量被声明了,但没有赋值时,就等于undefined。
    2.调用函数时,应该提供的参数没有提供,该参数等于undefined。
    3.对象没有赋值的属性,该属性的值为undefined。
    4.函数没有返回值时,默认返回undefined。
    null表示”没有对象”,即该处不应该有值。典型用法是:
    1.作为函数的参数,表示该函数的参数不是对象。
    2.作为对象原型链的终点。
    解析: 暂无解析

  • 第10题:

    判断题
    null和undefined都是原始类型的数据,保存在变量本地。()
    A

    B


    正确答案:
    解析: 暂无解析

  • 第11题:

    ( 难度:中等)Javascript 中, 以下那两个变量的值不是==:()
    A.var a=0 , b=-0;
    B.var a=NaN , b=NaN;
    C.var a=null ,
    b=undefined;
    D.var a=[] , b=false;

    答案:B

  • 第12题:

    (难度:中等)null转换为数值时是undefined

    答案:(no)

  • 第13题:

    7 .string = null 和string = “”的区别


    正确答案:
    答:前者没有分配内存控件,后着分配了

  • 第14题:

    null和undefined都是原始类型的数据,保存在变量本地。()


    正确答案:正确

  • 第15题:

    以下表达式的值结果为True的是?()

    • A、undefined==null
    • B、undefined===null
    • C、NaN==NaN
    • D、true==1

    正确答案:A,D

  • 第16题:

    以下哪个语句打印出来的结果是false()。

    • A、alert(1=true)
    • B、alert(isNaN(1))
    • C、alert(5="5")
    • D、alert(null=undefined)

    正确答案:B

  • 第17题:

    JavaScript的原始数据类型中null和undefined的共同点是()。

    • A、都是原始类型,保存在变量本地
    • B、都可以表示变量声明过但未被赋值,是所有未赋值变量的默认值
    • C、都可以表示变量不再指向任何对象地址
    • D、都是引用类型,值不保存在变量本地的数据类型

    正确答案:A

  • 第18题:

    JavaScript的基本数据类型包括String,boolean,Number,Undefined,Null。()


    正确答案:正确

  • 第19题:

    HttpSession session=request.getSession(false)与HttpSession session = request.getSession(true)的区别()。

    • A、没有区别
    • B、如果当前reqeust中的HttpSession 为null,当传入参数为空时,就创建一个新的Session,否则返回null
    • C、如果当前reqeust中的HttpSession 为null,当传入参数为true时,就创建一个新的Session,否则返回null

    正确答案:C

  • 第20题:

    判断题
    JavaScript的基本数据类型包括String,boolean,Number,Undefined,Null。()
    A

    B


    正确答案:
    解析: 暂无解析

  • 第21题:

    多选题
    null和undefined的共同点是()。
    A

    都是原始类型数据

    B

    都是引用数据类型

    C

    值不保存在变量本地

    D

    值保存在变量本地


    正确答案: C,B
    解析: 暂无解析

  • 第22题:

    ( 难度:中等)以下两个变量a 和b ,a+b 的哪个结果是NaN ?
    A.var a=undefind; b=NaN
    B.var a= ‘123’ ; b=NaN
    C.var a =undefined , b =NaN
    D.var a=NaN , b='undefined'

    答案:C

  • 第23题:

    (难度:中等)JavaScript基本数据类型有null、undefined、string、number、boolean

    答案:(yes)