How to use a custom data strucutre or data type defined in java script

// From a length
var uint16 = new Uint16Array(2);
uint16[0] = 42;
console.log(uint16[0]); // 42
console.log(uint16.length); // 2
console.log(uint16.BYTES_PER_ELEMENT); // 2
Uint16Array is defined as data structure or data type, then we can use it as 

var uint16 = new Uint16Array();