100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

JAVASCRIPT UNIT 3 EXAM QUESTIONS WITH VERIFIED SOLUTIONS GRADED A+

Rating
-
Sold
-
Pages
6
Grade
A+
Uploaded on
20-11-2025
Written in
2025/2026

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'.)

Show more Read less
Institution
JAVASCRIPT
Course
JAVASCRIPT









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
JAVASCRIPT
Course
JAVASCRIPT

Document information

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

Subjects

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)

Get to know the seller

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 Liberty University
View profile
Follow You need to be logged in order to follow users or courses
Sold
26
Member since
7 months
Number of followers
1
Documents
9766
Last sold
3 hours ago
Tutor Wes

Hi there! I'm Tutor Wes, a dedicated tutor with a passion for sharing knowledge and helping others succeed academically. All my notes are carefully organized, detailed, and easy to understand. Whether you're preparing for exams, catching up on lectures, or looking for clear summaries, you'll find useful study materials here. Let’s succeed together!

3.3

3 reviews

5
1
4
0
3
1
2
1
1
0

Recently viewed by you

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

Frequently asked questions