Scala and JavaScript stochastics computation.