Javascript consistency