阅读以下代码,执行fn(7)的返回值是( )。varx = 10;functionfn(myNum){ var x = 11returnx + myNum;}
A: 18
B: 17
C: 10
D: NaN
A: 18
B: 17
C: 10
D: NaN
举一反三
- varx=10;[br][/br] functioncals(myNum){ returnx+myNum; } 函数cals(7)返回什么? A: NaN B: 17 C: 107 D: 10
- 代码执行后,变量m的值是var x = 11; var y ="number";var m = x + y; A: NaN B: 11.0 C: 11number D: undefined
- varx=1; functionfn(n){ n=n+1 }; y=fn(x);y的值为() A: 2 B: 1 C: 3 D: undefined
- 有下列代码执行后的结果是var x = 10; function f1( num ){ ++ num; } var y = f1( x );console.log( 'x=' + x + '; y=' + y ); A: x=10; y=undefined B: x=10; y=11 C: x=11; y=11 D: x=11; y=undefined
- 下列JavaScript语句可以正确执行的是______。 A: var x = 10; x = "222"; B: var x = "222"; x = 10; C: var x = "222"; x = parseInt(x); D: var x = NaN; x = parseInt(x);