My goal is to create a class within the namespace TEST
using ECMAScript 6. Previously, I achieved this in "old" JavaScript with:
var TEST=TEST || {};
TEST.Test1 = function() {
}
Now, I am attempting the following approach:
var TEST=TEST || {};
class TEST.Test2 {
}
However, I am encountering an error regarding the dot between TEST and Test2:
Uncaught SyntaxError: Unexpected token
How can I successfully achieve what I am attempting without the use of transpilers, relying solely on native browser JavaScript?