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 코드
삭제
자동 저장된
게임을 복구할까요?