• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 6 pages
Exam (elaborations)

Javascript Unit 3 Exam Questions With Verified Solutions Graded A+

Document preview thumbnail
Preview 2 out of 6 pages

JAVASCRIPT UNIT 3 EXAM QUESTIONS WITH VERIFIED SOLUTIONS GRADED A+ A store has 20 apples in its inventory. How can you store this information in a JavaScript variable? let numApples == 20; 20 = numApples; let numApples = 20; let num apples = 20; - Answers let 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? let applesToBuy = readLine("How many apples would you like? "); let applesToBuy = ("How many apples would you like? "); let applesToBuy = readInt("How many apples would you like? "); let applesToBuy = nextInt("How many apples would you like? "); - Answers let 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? let leftOver = numApples / 3; let leftOver = 3 / numApples; let leftOver = numApples % 3; let leftOver = 3 % numApples; - Answers let leftOver = numApples % 3; What is the output of the following program: (Assume the user enters 'Florence' then 'Fernandez'.)

Content preview

JAVASCRIPT UNIT 3 EXAM QUESTIONS WITH VERIFIED SOLUTIONS GRADED A+

A store has 20 apples in its inventory. How can you store this information in a JavaScript
variable?



let numApples == 20;

20 = numApples;

let numApples = 20;

let num apples = 20; - Answers let 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?



let applesToBuy = readLine("How many apples would you like? ");

let applesToBuy = console.log("How many apples would you like? ");

let applesToBuy = readInt("How many apples would you like? ");

let applesToBuy = nextInt("How many apples would you like? "); - Answers let 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?



let leftOver = numApples / 3;

let leftOver = 3 / numApples;

let leftOver = numApples % 3;

let leftOver = 3 % numApples; - Answers let leftOver = numApples % 3;

What is the output of the following program: (Assume the user enters 'Florence' then
'Fernandez'.)



let firstName = readLine("What is your first name? ");

, let lastName = readLine("What is your last name? ");

let wholeName = firstName + lastName;

console.log(wholeName);




Fernandez Florence



Florence

Fernandez



FlorenceFernandez



Florence Fernandez - Answers FlorenceFernandez

Which of the following choices is a properly formed JavaScript variable name, meaning it is both
legal in the JavaScript language and considered good style?



user_age

UserAge

userAge

User age - Answers userAge

If you were given the following variables:

let distance = 2; let time = 30;



What line of code would print the speed in km/hr if the distance is given in km and the time is
given in minutes? (Speed = distance / time)

Document information

Uploaded on
November 20, 2025
Number of pages
6
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$10.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
joshuawesonga22
3.6
(15)
Sold
147
Followers
2
Items
16164
Last sold
1 week ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions