JS trinary done