Google Script Lesson 5 – Variable Passing Challenge

In this challenge, you want to pass two variables, ‘studentEmail’ and ‘message’, to the function emailStudent.To do this, you’ll need to add the variables as parameters to both the function CALL, and the function DEFINITION.Once you’ve done this, use the Logger.log command to log both variables and make sure they made it to the emailStudent function.

Either make a copy of this script file or copy and paste the code below into a new file.

function myFunction() {
  
  var studentEmail = "johnnysmith@school.edu";
  var message = "Johnny is doing well in school.";
  
  emailStudent();
}

function emailStudent(){

}

Leave a comment

Your email address will not be published. Required fields are marked *