js to be string seconds code example Example: h = (h < 10) ? "0" + h : h; h = (h < 10) ? "0" + h : h;