KA Intro to JS Variables

KA Intro to JS Variables

KG - University

5 Qs

quiz-placeholder

Similar activities

Quiz 3 Review

Quiz 3 Review

9th - 12th Grade

8 Qs

P5.js

P5.js

6th Grade

10 Qs

G6-W4-Quiz-Animation

G6-W4-Quiz-Animation

6th Grade

10 Qs

p5.js activity

p5.js activity

9th - 12th Grade

7 Qs

p5.js - using color & built-in variables

p5.js - using color & built-in variables

6th Grade

10 Qs

Wk1 Assessment 2nd term 2020

Wk1 Assessment 2nd term 2020

2nd Grade

10 Qs

Blockchain Day 2 Final Quiz

Blockchain Day 2 Final Quiz

Professional Development

10 Qs

p5.js shapes

p5.js shapes

9th - 12th Grade

8 Qs

KA Intro to JS Variables

KA Intro to JS Variables

Assessment

Quiz

Computers

KG - University

Medium

Used 549+ times

FREE Resource

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these lines of code is valid JavaScript for defining a variable?
var noseSize = 10;
noseSize is 10
var noseSize == 10;
var nose Size = 10;

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is a valid variable name in JavaScript?
123abc
abc123
abc   123
abc123!

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these lines show the correct way to reassign a variable to a new value?
myFace = 10;
10 -> myFace;
var myFace = 10;
10 = myFace;

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If boxSize is a variable holding the value 20, which of these lines of code would make a 20x20 square?
rect(10, 10, boxSize, boxSize);
rect(boxSize, 10, 10, boxSize);
rect(10, 10, boxSize);
rect(10, 10, boxSize * boxSize);

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If cPos is a variable holding the value 200, which of these would draw a circle with a center point of 150, 
ellipse(cPos-50, cPos-50, 20, 20);
ellipse(cPos+50, cPos+50, 20, 20);
ellipse(cPos-50, 20, 20);
ellipse(cPos-=50, cPos-=50, 20);