On Tue, 5 Oct 2021, nick's hardware wrote: > Is there a pas2js way of doing what this javascript code does? > > var Image = new Uint8ClampedArray([0,0,0,255,0,0,0,255,0,0]); This works: var a : TByteDynArray; Image : TJSUint8ClampedArray; begin a:=[0,0,0,255,0,0,0,255,0,0]; Image:=TJSUint8ClampedArray.From(a); end; Michael.