最初から始める方は下記からどうぞ。
Q181. これを実行するとどうなりますか?
1 2 3 4 |
function bark() { console.log('Woof!'); } bark.animal = 'dog'; |
1.Nothing, this is totally fine!
2.SyntaxError. You cannot add properties to a function this way.
3.”Woof” gets logged.
4.ReferenceError
A181.
1.Nothing, this is totally fine!
2.SyntaxError. You cannot add properties to a function this way.
3.”Woof” gets logged.
4.ReferenceError
A181.
1.Nothing, this is totally fine!
Q182. 表示される結果は何ですか?
1 2 3 4 |
function getAge(...args) { console.log(typeof args); } getAge(21); |
1.”number”
2.”array”
3.”object”
4.”NaN”
A182.
3.”object”
2.”array”
3.”object”
4.”NaN”
A182.
3.”object”
Q183. 表示される結果は何ですか?
1 2 3 4 5 |
String.prototype.giveLydiaPizza = () => { return 'Just give Lydia pizza already!'; }; const name = 'Lydia'; name.giveLydiaPizza(); |
1.”Just give Lydia pizza already!”
2.TypeError: not a function
3.SyntaxError
4.undefined
A183.
1.”Just give Lydia pizza already!”
2.TypeError: not a function
3.SyntaxError
4.undefined
A183.
1.”Just give Lydia pizza already!”
Q184. 表示される結果は何ですか?
1 2 3 4 |
for (let i = 1; i < 5; i++) { if (i === 3) continue; console.log(i); } |
1.1 2
2.1 2 3
3.1 2 4
4.1 3 4
A184.
3.1 2 4
2.1 2 3
3.1 2 4
4.1 3 4
A184.
3.1 2 4
Q185. 表示される結果は何ですか?
1 2 |
const obj = { 1.'one', 2.'two', 1.'three' }; console.log(obj); |
1 2 3 4 5 6 7 8 |
1. { 1."one", 2."two" } 2. { 2."two", 1."three" } 3. { 1."three", 2."two" } 4. SyntaxError |
A185.
1 2 |
3. { 1."three", 2."two" } |
Q186. 表示される結果は何ですか?
1 2 3 4 5 6 7 8 9 10 11 12 |
function checkAge(data) { if (data === { ag5.18 }) { console.log('You are an adult!'); } else if (data == { ag5.18 }) { console.log('You are still an adult.'); } else { console.log(`Hmm.. You don't have an age I guess`); } } checkAge({ ag5.18 }); |
1.You are an adult!
2.You are still an adult.
3.Hmm.. You don’t have an age I guess
A186.
3.Hmm.. You don’t have an age I guess
2.You are still an adult.
3.Hmm.. You don’t have an age I guess
A186.
3.Hmm.. You don’t have an age I guess
Q187. 表示される結果は何ですか?
1 2 3 4 5 6 |
const obj = { 1: 'a', 2: 'b', 3: 'c' }; const set = new Set([1, 2, 3, 4, 5]); obj.hasOwnProperty('1'); obj.hasOwnProperty(1); set.has('1'); set.has(1); |
1.false true false true
2.false true true true
3.true true false true
4.true true true true
A187.
3.true true false true
2.false true true true
3.true true false true
4.true true true true
A187.
3.true true false true
Q188. 表示される結果は何ですか?
1 2 3 4 5 6 7 8 |
function getPersonInfo(one, two, three) { console.log(one); console.log(two); console.log(three); } const person = 'Lydia'; const age = 21; getPersonInfo`${person} is ${age} years old`; |
1 2 3 4 5 6 |
1. "Lydia" 21 ["", " is ", " years old"] 2. ["", " is ", " years old"] "Lydia" 21 3. "Lydia" ["", " is ", " years old"] 21 |
A188.
1 2 |
2. ["", " is ", " years old"] "Lydia" 21 |
Q189. cool_secretはどのくらいの期間アクセスできますか?
1 |
sessionStorage.setItem('cool_secret', 123); |
1.永遠に、データは失われません。
2.ユーザーがタブを閉じたとき。
3.ユーザーがタブだけでなくブラウザ全体を閉じたとき。
4.ユーザーがコンピューターの電源を切ったとき。
A189.
2.ユーザーがタブを閉じたとき。
2.ユーザーがタブを閉じたとき。
3.ユーザーがタブだけでなくブラウザ全体を閉じたとき。
4.ユーザーがコンピューターの電源を切ったとき。
A189.
2.ユーザーがタブを閉じたとき。
Q190. 表示される結果は何ですか?
1 2 3 |
var num = 8; var num = 10; console.log(num); |
1.8
2.10
3.SyntaxError
4.ReferenceError
A190.
2.10
2.10
3.SyntaxError
4.ReferenceError
A190.
2.10
コメント