var str = "Helloworld" var re = str.charAt(5) console.log(re) 请问输出的结果为
w
举一反三
- var str = "Hello world" var re = str.indexOf("h") console.log(re) 请问输出的结果为
- 代码的输出结果是var str = ''; for(var b = 1;b < 11;b ++){ str += 'helloworld<br>'; } document.write(str); A: helloworld B: helloworld<br> C: 输出10个helloworld D: 输出10个helloworld<br>
- 以下代码var str=100.00;console.log(parseInt(str))输出结果正确的是()。 A: 1 B: 100.0 C: 10.00 D: 100
- 以下代码的输出结果是?var str='abc';var b=new Boolean(str)console.log(b) A: true B: abc C: false D: 0
- var str=new("认真完成作业") var a=str.length 请问变量a为?
内容
- 0
var str = “qianfengana”; var res = str.lastIndexOf(“a”); console.log(res); 输出的结果是 A: 9 B: 2 C: 7 D: 10
- 1
var a ='1' var b = 1 var c =true console.log(a-c-b) 请问输出的结果
- 2
在JavaScript中,把字符串“123”转换为整型值123的正确方法是( )。 A: var str="123";var num=(int)str; B: var str="123";var num=str.parseInt(str); C: var str="123";var num=parseInt(str); D: var str="123";var num=Integer.parseInt(str);
- 3
在JavaScript中,把字符串“123”转换为整型值123的正确方法是( )。 A: var str="123";var num=(int)str; B: var str="123";var num=str.parseInt(str); C: var str="123";var num=parseInt(str); 转换函数 D: var str="123";var num=Integer.parseInt(str);
- 4
以下代码执行以后结果为?var str;alert(typeof str);