• 2022-06-07
    下面创建数组的方法正确的有( )。
    A: var fruit=new Array("apple","banana","orange","peach");
    B: var fruit={"apple","banana","orange","peach"};
    C: var fruit=["apple","banana","orange","peach"];
    D: var fruit=["apple","banana","orange",123];
  • A,C,D

    内容

    • 0

      (All) fruit contains fiber: an orange provides seven, (a apple five), and a banana four, but (half of) a grapefruit (provides) six grams. A: All B: a apple five C: half of D: provides

    • 1

      以下代码的输出结果是。 d={‘fruit’:{‘apple’:4,’orange’:10}} print(d.get(‘apple’,’no’))( ) A: 4 B: no C: fruit D: orange

    • 2

      中国大学MOOC: 下列语句执行后,print(di[‘fruit’][1])值为【 】di={‘fruit’:[‘apple’,’banana’,’orange’]}di[fruit].append(‘watermelon’)

    • 3

      Fruit类有Apple和Orange两个子类,Fruit fruit=new Apple(); 该语句是对象类型转换中的_______转型。

    • 4

      I love ( ). A: banana B: apple C: grape D: orange