Is it possible to create a custom Class using the class keyword?
Is it possible to create a class in Lens Studio, e.g.
class Person {
constructor(item1, item2) {
this.item1 = item1;
this.item2 = item2;
}
function f() {
//do stuff
}
}
I know that it is possible to make it as an object, i.e.
function Person(item1, item2) {
this.item1 = item1;
this.item2 = item2;
this.f = function() {
//do stuff
}
}
hi John Conacher
you can use JavaScript like we use to in web development
but its not allowed yet to deal with links and URL's
Have fun and can't wait to see your creation.
Cheers.
John Conacher FYI no (at least not at present), the JavaScript interpreter seems to be limited to es5 syntax. You could go old school and use the prototype chain / functional equivalent of a class, or perhaps go the other direction and compile your code down to es5 from an external editor with bundler to compile down to es5. I'll probably end up doing the latter at some point myself.