I am trying to declare a class with a private variable in Google Apps Script V8 runtime. Here is the code:
class Exam{
var examName = "";
getExamName(){
return this.examName;
}
}
When I go to save this, I get the following syntax error:
Syntax error: SyntaxError: Unexpected identifier line: 2 file: Code.gs
What am I doing wrong?