Tag: arrays

install Scala version 2.12.4 news

The most popular way to get Scala is either using Scala through sbt, the Scala build tool, or to use Scala through an IDE. 1 First, make sure you have the Java 8 JDK installed. To check, open the terminal and type: java -version(Make sure you have version 1.8.) (If you don't have it installed, download … Continue reading install Scala version 2.12.4 news


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