What function will output the text "Hello"? Options: output("Hello");, add("Hello");, printLine("Hello");, println("Hello");
JavaScript Console & Graphics Review

Flashcard
•
Computers
•
9th - 12th Grade
•
Hard
Quizizz Content
FREE Resource
Student preview

25 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Back
println("Hello");
Answer explanation
The function 'println("Hello");' is the correct choice as it outputs the text 'Hello' to the console, typically adding a newline after. The other options do not correspond to standard output functions in most programming languages.
2.
FLASHCARD QUESTION
Front
What function would you use if you want to ask a user for an integer? Options: readLine(), readString(), readInt(), readFloat()
Back
readInt()
Answer explanation
To ask a user for an integer, the correct function is readInt(). This function specifically reads and converts user input into an integer type, while the other options do not serve this purpose.
3.
FLASHCARD QUESTION
Front
What is the correct syntax for asking a user for their name? Options: var name = readLine("What is your name?");, var name; printLn("What is your name?");, readLine("What is your name?");, var name = "What is your name?"
Back
var name = readLine("What is your name?");
Answer explanation
The correct syntax for asking a user for their name is 'var name = readLine("What is your name?");'. This line declares a variable 'name' and assigns it the value returned by the readLine function, which prompts the user.
4.
FLASHCARD QUESTION
Front
What do we call the information that goes in between the parentheses when we call a function? Example: println("Hello")
Back
argument(s)
Answer explanation
The information inside the parentheses when calling a function is called 'arguments'. In the example println("Hello"), "Hello" is the argument passed to the println function.
5.
FLASHCARD QUESTION
Front
What is an integer?
Back
A whole number, either positive or negative
Answer explanation
An integer is defined as a whole number that can be either positive or negative, such as -3, 0, or 5. This distinguishes it from fractions or decimal numbers, making the first choice the correct answer.
6.
FLASHCARD QUESTION
Front
What is the punctuation that we always use around strings?
Back
Double quotes ""
Answer explanation
In programming, strings are typically enclosed in double quotes ". This is a standard convention in many languages, making "Double quotes" the correct choice for surrounding strings.
7.
FLASHCARD QUESTION
Front
What is a float?
Back
A number with a fraction expressed as a decimal
Answer explanation
A float is defined as a number that includes a fraction, represented in decimal form. This distinguishes it from whole numbers, which do not have fractional parts.
Create a free account and access millions of resources
Similar Resources on Quizizz
20 questions
Midterm YWLA AP CSP

Flashcard
•
9th - 12th Grade
20 questions
Python Basics Review (TSK)

Flashcard
•
9th - 12th Grade
20 questions
JavaScript Math

Flashcard
•
9th - 11th Grade
21 questions
AP CSP Unit 7: Parameters, Returns, and Libraries

Flashcard
•
9th - 12th Grade
20 questions
CodeHS Python Unit 3 Flashcard Review

Flashcard
•
9th - 12th Grade
19 questions
AP CSP Unit 5 Review: Lists, Loops and Traversals

Flashcard
•
9th - 12th Grade
20 questions
CSP Unit 4 Review

Flashcard
•
9th - 12th Grade
20 questions
CSP Unit 4 Review

Flashcard
•
9th - 12th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University