JavaScript Functions: Syntax and Usage
10 Questions
1 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

The result of the add function is logged to the console using the ______ function.

console.log

In the getMeanTemp function, the sum of the temperatures is calculated using a ______ loop.

for

The global variable ______ will be removed from the code.

meanTemp

The day1 and day2 variables contain ______ data.

<p>measurement</p> Signup and view all the answers

The getMeanTemp function takes one ______ for the temperatures.

<p>parameter</p> Signup and view all the answers

The mean temperature is calculated by dividing the sum by the ______ of the temperatures array.

<p>length</p> Signup and view all the answers

The getMeanTemp function is called with the ______ variable as an argument.

<p>day1</p> Signup and view all the answers

The second time the getMeanTemp function is called, it is passed the ______ variable as an argument.

<p>day2</p> Signup and view all the answers

The temperatures array is iterated over using a ______ variable.

<p>i</p> Signup and view all the answers

The result of the getMeanTemp function is logged to the console using template literals.

Signup and view all the answers

More Like This

JavaScript Rest Parameter Syntax
10 questions
5. JavaScript Functions
37 questions

5. JavaScript Functions

MagnanimousCloisonnism avatar
MagnanimousCloisonnism
Use Quizgecko on...
Browser
Browser