Структуры (записи)

//In Javascript there are no structures
let boldLine = {
    'lineWidth'function () {
        return 10;
    }
};
Object.freeze(boldLine);

let lineWidth1 = boldLine.lineWidth();
//lineWidth is 10

boldLine.lineWidth = 5//<-Error

let lineWidth2 = boldLine.lineWidth();
//lineWidth is 10

console.log(`lineWidth1 is ${lineWidth1}`);
console.log(`lineWidth2 is ${lineWidth2}`);