JS for Google Workplace Flashcards

1
Q

What link can you use to create a new Google Sheet?

A

sheets.google.com/create

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does the below code do?

A

Extracts a street address from a cell in a Google Sheet, generates a Google Map based on the address, and then sends the map as an attachment using Gmail.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does the below line of code do in JS?

A

Most scripts ask the user for some permissions before they can run. These permissions control what the user is allowing the script to do. The first line is a comment containing an optional annotation instructing Apps Script to limit access to the current spreadsheet (as opposed to all the user’s spreadsheets). It’s always best practice to include this annotation when you’re only working with a single file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does the below line of code do in JS?

A

Calls the Spreadsheet Service accessible from Apps Script through the SpreadsheetApp object. The returned sheet is assigned to a variable of the same name. The getActiveSheet() method gets a reference to the current sheet object and stores it in the variable “sheet”.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does the below line of code do in JS?

A

With the sheet object, we reference the cell range (of a single cell) in A1 notation with getRange(). A “range” is a group of cells, including a single one like cell A1 (the one we entered the address in). To fetch what’s inside the range, the getValue() method returns the value of the top-left cell in the range and assigns to the value to the variable address.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does the below line of code do in JS?

A

Connects to the Google Maps Service using the Maps object. newStaticMap() creates a static map object and the addMarker() method adds a “pin” to the map using the address in the sheet.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does the below line of code do in JS?

A

The Gmail Service, through the MailApp object, calls the sendEmail() method to send the email that includes both the text “See below.” and the map image as an attachment.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly