This example builds on the previous one, but in addition to appending the text to a Google Doc, it emails the student with both the feedback and a link to the doc. Click here to open it and make a copy for yourself. It does so with an additional 4 commands […]
pswanson
In this example we get into the real power of Google Scripts: the ability to interact with Google Docs, Sheets, and more. Click here to view the Example Script 07 – Modifying a Google Doc. function myFunction() { /* The array, data, has three values: studentEmail, message, and docId */ […]
In Google Script, as in most coding, arrays are an important way of storing a series of variables. For a look at arrays in javascript, click here: http://www.w3schools.com/js/js_arrays.asp Take a look at the following example, or click here to make your own copy of the code: function myFunction() { var data […]
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 […]
In the previous example, there was a bit of code that was repeated twice: the Logger.log series of commands. Whenever you see code being used more than once, it’s a good sign that you need to build a new function for it. However, in order for this to work in […]
In this example we begin to look at variables. Just like in algebra, a variable can hold a range of values, but in coding they are also a little bit different. Variables in JavaScript have different types, the most basic of which are Strings and Numbers. Simply put, Strings contain […]