1) Which symbol is used to assign a value to a variable? a) == b) = c) += d) === 2) What does a boolean value represent? a) True or False b) Number c) Text d) Array 3) Which keyword declares a variable? a) var b) let c) const d) All of the above 4) What is the purpose of an if-else statement? a) Make decisions b) Repeat actions c) Define functions d) Create loops 5) Which loop runs as long as the condition is true? a) for loop b) while loop c) do-while loop d) if statement 6) What library is used for creating sprites in p5.js? a) p5.play b) p5.sprites c) p5.graphics d) p5.objects 7) What property might you change to move a sprite? a) x position b) color c) size d) velocity 8) How do you compare two values for equality? a) = b) == c) === d) != 9) What is a function? a) A reusable block of code b) A type of variable c) A loop structure d) A data type 10) Which keyword is used to define a function? a) function b) def c) func d) declare 11) What does the 'for' loop do? a) Repeats a block b) Makes decisions c) Defines variables d) Creates sprites 12) Which property defines the size of a sprite? a) width b) height c) size d) scale 13) What is the main use of the p5.js library? a) Graphics and interaction b) Data processing c) Networking d) Sound editing 14) Which of these is a data type? a) Number b) Boolean c) String d) All of the above 15) What does the 'else' part do in an if-else statement? a) Provides an alternative b) Repeats code c) Defines a variable d) Creates a loop 16) How do you start a while loop? a) while (condition) b) do (condition) c) loop (condition) d) repeat (condition) 17) What is a sprite? a) A game object b) A type of variable c) A function d) A loop 18) What is the purpose of functions? a) Reuse code b) Organize code c) Simplify tasks d) All of the above 19) Which of these adds one to a variable? a) variable++ b) variable = variable + 1; c) varibale += 1 d) All of the above 20) Which of these subtracts 5 to a variable? a) variable -= 5; b) variable += 5; c) variable *= 5; d) Subtract 5
0%
JavaScript Basics Quiz for 8th Grade
共有
共有
共有
Mightymrhansen
さんの投稿です
8th Grade
Computing
コンテンツの編集
印刷
埋め込み
もっと見る
割り当て
リーダーボード
もっと表示する
表示を少なくする
このリーダーボードは現在非公開です。公開するには
共有
をクリックしてください。
このリーダーボードは、リソースの所有者によって無効にされています。
このリーダーボードは、あなたのオプションがリソースオーナーと異なるため、無効になっています。
オプションを元に戻す
迷路の追跡
は自由形式のテンプレートです。リーダーボード用のスコアは生成されません。
ログインが必要です
表示スタイル
フォント
サブスクリプションが必要です
オプション
テンプレートを切り替える
すべてを表示
アクティビティを再生すると、より多くのフォーマットが表示されます。
オープン結果
リンクをコピー
QRコード
削除
自動保存:
を復元しますか?