
Understanding JavaScript Functions and Parameters

Quiz
•
Computers
•
10th Grade
•
Medium
Rita Vasak
Used 7+ times
FREE Resource
11 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax for declaring a function named `myFunction` in JavaScript?
`function myFunction() {}`
`declare myFunction() {}`
`def myFunction() {}`
`create myFunction() {}`
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a function expression in JavaScript?
`function myFunc() {}`
`var myFunc = function() {}`
`function: myFunc() {}`
`myFunc function() {}`
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the term for the values passed to a function when it is called?
Parameters
Arguments
Variables
Constants
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the following function, what is the parameter? ```javascript function greet(name) { return "Hello, " + name; } ```
greet
name
"Hello, "
return
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following function return? ```javascript function add(a, b) { return a + b; } ```
The sum of `a` and `b`
The product of `a` and `b`
`a` minus `b`
`b` minus `a`
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code:
```javascript
var x = 10;
function example() {
var x = 20;
println(x); }
example(); ```
What will be printed to the screen?
10
20
30
undefined
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you ensure a function returns a value in JavaScript?
By using the `return` keyword followed by the value
By using the `output` keyword followed by the value
By using the `send` keyword followed by the value
By using the `give` keyword followed by the value
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Chapter 3 - Think Python - Voc

Quiz
•
9th - 12th Grade
14 questions
Python Basics

Quiz
•
9th - 12th Grade
8 questions
AP CSP Unit 3 Simple Review

Quiz
•
9th - 12th Grade
12 questions
OCR GCSE Programming Techniques

Quiz
•
9th - 12th Grade
10 questions
AND_OR Excel Functions Quiz

Quiz
•
9th Grade - University
15 questions
Python and PseudoCode Quiz

Quiz
•
10th Grade - University
10 questions
Penggunaan Pernyataan Function (4.2.2)

Quiz
•
3rd Grade - University
16 questions
Parts of a Method (Java)

Quiz
•
9th Grade - University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
1.2 OSI & TCP IP Models Quiz

Quiz
•
10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade