Tag: javascript

What’s New Angular 5: New features and updates?

After two major upgrades in the last 14 months, Angular - Google’s popular JavaScript framework - has released Angular 5, which arrived 1 November 2017. After missing previous release targets of 18 September and 23 October 2017, Angular 5 promises better code sharing capabilities, an updated HttpClient, faster rebuilds and an emphasis on making it easier to build progressive web apps. Some of the … Continue reading What’s New Angular 5: New features and updates?

Advertisements

JavaScript implicit coercion of empty arrays

JavaScript implicit coercion of empty arrays example: [] == ![] //toBoolean [1] [] == !true [] == false //loose equality round one [2] //toPrimitive([]) [3] "" == false //loose equality round two //toBoolean("") [4] false === false true explanations: 1) First there is operator precedence so ! evaluates before == Negating something calls the internal toBoolean method onto that "something" first. … Continue reading JavaScript implicit coercion of empty arrays