Skip to content Skip to sidebar Skip to footer
Showing posts with the label Shorthand

Ruby Hash Equivalent Of Javascript's Object Initializer Es6 Shorthand

In JavaScript ES6 we can create objects where variable names become keys like this: > let a = &#… Read more Ruby Hash Equivalent Of Javascript's Object Initializer Es6 Shorthand

Return Result From Ternary In One Line (javascript)

In JavaScript, rather than having to assign the result to a variable, is it possible to return the … Read more Return Result From Ternary In One Line (javascript)

What Does Shorthand "index >= 0 && Count++" Do?

I was killing time reading the underscore.string functions, when I found this weird shorthand: func… Read more What Does Shorthand "index >= 0 && Count++" Do?

Iterating Through A Range In Both Directions

There is a very common and easy task of looped iteration through some range in both directions: Th… Read more Iterating Through A Range In Both Directions