let foo = 13;
let bar = 42;
let baz = 69;
let qux = 86;
let whatever = {
foo,
bar,
baz,
qux
};
console.log(whatever);
...is the same as...
let foo = 13;
let bar = 42;
let baz = 69;
let qux = 86;
let whatever = {
foo: foo,
bar: bar,
baz: baz,
qux: qux
};
console.log(whatever);
The former in TypeScript will make the later in JavaScript.
No comments:
Post a Comment