The Aaron  said:  Our best guess at the implementation of log() is something like:  const log = function(thing){
  if(_.isString(thing)){
    return console.write(thing);
  }
  return console.write(JSON.stringify(thing));
}; JSON doesn't have a representation for NaN.  In the first case, it gets converted to null as the "not a value" identifier for JSON.  In the second case, you are concatenating it with a string, causing NaN.toString() to be called, which returns "NaN".  Pretty sure the log implementation doesn't special-case strings, since the output includes quotes;  JSON.stringify('a')  produces  "a" .  Once upon a time, it was possible to look at the source code for the Roll20 library functions (eg,  log(log.toString()) ), but Riley closed that after I mentioned it to him. And there I was not thinking to record anything for posterity. =P