The monocle shines here... (comments inline)
On Mon, Jan 23, 2012 at 1:43 PM, Herby Vojčík <[email protected]> wrote:
> Hello,
>
> not very often, but also not very rare, is there the case of this kind of
> code:
>
> var result = {
> model: model,
> seats: seats
> };
> if (space) {
> result.truck = true;
> result.space = space;
> }
>
var result = {
model: model,
seats: seats
};
if ( space ) {
result.{
truck: true,
space: space
}
}
>
> Object literal extension (and get/set before them) have shown that blocks
> can be used in object literal.
>
> I propose to have possibility to write
>
> var result = {
> model: model,
> seats: seats,
> if (space) {
> truck: true,
> space: space
> }
> };
>
> in object literal, and similar possibility of conditional definition in
> the body of a class.
>
> Herby
> ______________________________**_________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/**listinfo/es-discuss<https://mail.mozilla.org/listinfo/es-discuss>
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss