[Pas2js] Object literals?

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Jun 3 07:44:22 CEST 2018


On Sun, 3 Jun 2018 09:55:41 +0700
Ryan Joseph <ryan at thealchemistguild.com> wrote:

> can you make object literals (I think that’s what they’re called)/associative arrays/dictionaries in pas2js? Somehow I didn’t come across that in the short time I used it. I know I can make a record but it should be possible using JSArray I thought (I was told the index of an array can be a string or other type).
> 
> d = { items: [], text: '’ };

Maybe this helps:
http://wiki.freepascal.org/pas2js#Create_simple_JS_objects_with_the_new_function

Mattias


More information about the Pas2js mailing list