Javascript Basics Flashcard Review
Flashcard
•
Computers
•
12th Grade
•
Practice Problem
•
Hard
Wayground Content
FREE Resource
Student preview

18 questions
Show all answers
1.
FLASHCARD QUESTION
Front
If we want to generate a random number where 5 is the smallest number possible and 10 is the largest number possible, which line of code would be correct?
Back
let rand = Randomizer.nextInt(5, 10);
2.
FLASHCARD QUESTION
Front
You are splitting up all of your apples equally between 3 people. Which statement below will calculate how many apples will be left over? Options: let leftOver = numApples / 3; let leftOver = 3 / numApples; let leftOver = numApples % 3; let leftOver = 3 % numApples;
Back
let leftOver = numApples % 3;
3.
FLASHCARD QUESTION
Front
What would be the correct way to name a function that tells us the day of the week? Options: function dayofweek() { ... } , function day_of_week() { ... } , function DayOfWeek() { ... } , function dayOfWeek() { ... }
Back
function dayOfWeek() { ... }
Answer explanation
Good job! We use the camel case naming convention in JavaScript functions. Therefore the first letter of the first word is lower case and the first letter of the following words should be upper case.
4.
FLASHCARD QUESTION
Front
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) Options: console.log(distance / (time / 60));, console.log(distance / time);, console.log(distance * (time * 60));, console.log(distance * time);
Back
console.log(distance / (time / 60));
5.
FLASHCARD QUESTION
Front
Which of the following is part of the navigator’s role in pair-programming? Options: defining all of the functions, focusing on the task at hand, thinking of alternative ways to solve the problem, initializing the variables
Back
thinking of alternative ways to solve the problem
Answer explanation
Good job! It is the driver’s job to type out all of the code. The navigator’s job includes thinking of alternative, more efficient ways to solve the problem.
6.
FLASHCARD QUESTION
Front
What is the output of the following program: (Assume the user enters ‘Florence’ then ‘Fernandez’.)
Back
FlorenceFernandez
Answer explanation
Good job! We didn’t include a space between the first and last name in our wholeName variable or in the console.log command. Be careful when concatenating strings and make sure to double-check your spaces!
7.
FLASHCARD QUESTION
Front
A store has 20 apples in its inventory. How can you store this information in a JavaScript variable?
Back
let numApples = 20;
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
11 questions
Genetic Engineering Concepts
Flashcard
•
11th Grade - University
16 questions
Barriers of physician-patient relationships inprofessionalism
Flashcard
•
University
10 questions
SUP E3 - PART 1
Flashcard
•
University
10 questions
Disney descendants flashcard
Flashcard
•
KG
15 questions
Parts of speech: general review
Flashcard
•
11th - 12th Grade
15 questions
AP Biology Genetics Flashcard
Flashcard
•
12th Grade - University
15 questions
"The Importance of Being Earnest"
Flashcard
•
12th Grade - University
12 questions
Present perfect Vs past tense
Flashcard
•
University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
15 questions
Christmas Song Emoji Pictionary
Quiz
•
7th - 12th Grade
20 questions
Christmas Movies
Quiz
•
1st - 12th Grade
55 questions
CHS Holiday Trivia
Quiz
•
12th Grade
20 questions
Christmas Movie Trivia
Quiz
•
9th - 12th Grade
29 questions
christmas facts
Lesson
•
5th - 12th Grade
20 questions
Christmas Trivia
Quiz
•
5th - 12th Grade
20 questions
Stages of Meiosis
Quiz
•
9th - 12th Grade