Print it Out Explainer

Aim of the puzzle: Use Apps Script to get the text of a document from Docs.

Walk through of the solution: Apps Script has custom code functions that connect to Docs. One example is .getText(), which returns the text of a document from Docs.

To complete the puzzle, create a variable named doc2 that uses DocumentApp.openById() with id2 as an argument. Then, create a variable named text2 that gets the text from doc2 using .getText(). Finally, print text2 to the console.

Sample code solution:

let id1 = "1VFYFgTvngQzMgm-x1Kyejv1fiTWVTahG9G8x2a76sAM";
let id2 = "1NH4DAJhLXW2f4DNi0ciEDoCOLe4cFbp0s_qMFRgfR84";

let doc1 = DocumentApp.openById(id1);
let text1 = doc1.getText();

let doc2 = DocumentApp.openById(id2);
let text2 = doc2.getText();

JavaScript concepts: Variables, Strings

Apps Script concepts: DocumentApp, openById(), .getText()