2025/2026 Exam Questions and Detailed
Answers | Get it 100% Correct Answers
A store has 20 apples in its inventory. How can you store this information in
a JavaScript variable? - 🧠 ANSWER ✔✔var numApples = 20;
You want to read input from the user to know how many apples they would
like to buy. Which statement should you use to read in a number from the
user? - 🧠 ANSWER ✔✔var applesToBuy = readInt("How many apples
would you like? ");
You are splitting up all of your apples equally between 3 people. Which
statement below will calculate how many apples will be left over? - 🧠
ANSWER ✔✔var leftOver = numApples % 3;
In a graphics canvas, what are the coordinates of the bottom right corner of
the window? - 🧠 ANSWER ✔✔getWidth(), getHeight()
What are the coordinates of the center of the window? - 🧠 ANSWER
✔✔getWidth() / 2, getHeight() / 2
COPYRIGHT©NINJANERD 2025/2026. YEAR PUBLISHED 2025. COMPANY REGISTRATION NUMBER: 619652435. TERMS OF USE. PRIVACY
1
STATEMENT. ALL RIGHTS RESERVED
, In the following code:
var size = 20;
var x = 100;
var y = 200;
var ball = new Circle(size);
ball.setPosition(x, y);
What is the meaning of the x variable? - 🧠 ANSWER ✔✔The x coordinate
of the center of the circle
The following program should draw a circle on the screen
1 function start(){
2 var circle = new Circle(40);
3 circle.setPosition(getWidth() / 2, getHeight() / 2);
4 circle.setColor(Color.blue);
COPYRIGHT©NINJANERD 2025/2026. YEAR PUBLISHED 2025. COMPANY REGISTRATION NUMBER: 619652435. TERMS OF USE. PRIVACY
2
STATEMENT. ALL RIGHTS RESERVED