JavaScript基礎考核真題——你能全做對嗎?
阿新 • • 發佈:2022-05-03
正文
JavaScript基礎考核真題——你能全做對嗎。劉國利 - 獨行冰海 : 每位講師在授課、管理的同時,還需要不斷的涉獵各種知識,提升本職技術。本文章的考題是對講師的JavaScript基礎進行了檢測,即便是基礎,也不能忽視了,大家可以來嘗試一下哦~
1、輸出結果是多少?(1分,第一小題0.6分,第二小題0.4分)
1、1
var a;
var b = a * 0;
if (b == b) {
console.log(b * 2 + "2" - 0 + 4);
} else {
console.log(!b * 2 + "2" - 0 + 4);
}
1、2
<script> var a = 1; </script> <script> var a; var b = a * 0; if (b == b) { console.log(b * 2 + "2" - 0 + 4); } else { console.log(!b * 2 + "2" - 0 + 4); } </script>
2、幾道題的輸出結果分別是多少?(1.25分,每小題0.25分)
2、1
function test(test){
test = 10;
var test = test;
test++;
}test(5);
console.log(test);
2、2
var t = 10;
function test(t){
var t = t++;
}test(t);
console.log(t);
2、3
var t = 10; function test(test){ var t = test++; }test(t); console.log(t);
2、4
var t = 10;
function test(test){
t = test++;
}test(t);
console.log(t);
2、5
var t = 10;
function test(test){
t = t + test;
console.log(t);
var t = 3;
}test(t);
console.log(t);
3、基本資料型別的專業術語以及單詞拼寫(0.25分)
4、變數的命名規範以及命名推薦(1分)
5、三種彈窗的單詞以及三種彈窗的功能(0.5分)
6、console.log( 8 | 1 ); 輸出值是多少?(0.25分)
7、輸出結果分別是多少?(0.75分,每小題0.25分)
7、1
<script>
var a = 1;
</script>
<script>
var a;
var b = a / 0;
if (b == b) {
console.log(b * 2 + "2" - 0 + 4);
} else {
console.log(!b * 2 + "2" - 0 + 4);
}
</script>
7、2
var a;
var b = a / 0;
if (b == b) {
console.log(b * 2 + "2" - 0 + 4);
} else {
console.log(!b * 2 + "2" - 0 + 4);
}
7、3
<script>
var a = 1;
</script>
<script>
var a;
var b = a / 0;
if (b == b) {
console.log(b * 2 + "2" + 4);
} else {
console.log(!b * 2 + "2" + 4);
}
</script>