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
Delen
Delen
Delen
door
Mightymrhansen
8th Grade
Computing
Inhoud Bewerken
Afdrukken
Embedden
Meer
Toewijzingen
Scorebord
Meer weergeven
Minder weergeven
Dit scoreboard is momenteel privé. Klik op
Delen
om het publiek te maken.
Dit scoreboard is uitgeschakeld door de eigenaar.
Dit scoreboard is uitgeschakeld omdat uw opties anders zijn dan die van de eigenaar.
Opties Herstellen
Labyrint
is een open template. Het genereert geen scores voor een scoreboard.
Inloggen vereist
Visuele stijl
Lettertypen
Abonnement vereist
Opties
Template wisselen
Alles weergeven
Er zullen meer templates verschijnen terwijl je de activiteit gebruikt.
Open resultaten
Kopieer link
QR-code
Verwijderen
Automatisch opgeslagen activiteit "
" herstellen?