Clean  javascript way to solve in 0ms, beat 100%
Intuitionh1, h2, m1, m2
have it own combination
m1 and m2 is straigt forward
m1, min one is 0, 1, 2, 3, 4, 5. total 6
m2, min two is 0, 1..........9. total 10
i
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

h1, h2, m1, m2
have it own combination 
m1 and m2 is straigt forward
m1, min one is 0, 1, 2, 3, 4, 5. total 6
m2, min two is 0, 1..........9. total 10
if h1, h2 both ??, 1..........24. total 24

the tricky part is if h1 or h2 one of them is ?

if the h1 == ? with h2<=3 is ?0, ?1, ?2, ?3 , it can 0, 1, 2 (3 option)
if the h1 == ? with h2>=4  is ?4, ?5....?9, it can 0, 1 (2 option)

same logic for the possibily for h2 === ? and get the posbility of h1

one last possiblily if none ? , then it is 1


# Approach
<!-- Describe your approach to solving the problem. -->

multiply all the possibly together , you will get the answer

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```javascript []
/**
 * @param {string} time
 * @return {number}
 */
var countTime = function(time) {
    const [h1,h2,_,m1,m2] = time.split("")
    let res = 1

    if(h1 === "?" && h2 === "?") res *= 24
    else if(h1 === "?" && h2 !== "?"){
        if(Number(h2) <=3 ) res *= 3 //if the h2 is ?0, ?1, ?2, ?3 , it can 0, 1, 2 (3 option)
        else res*=2 //if the h2 is ?4, ?5....?9, it can 0, 1 (2 option)
    }else if(h1 !== "?" && h2 === "?"){
        if(h1 === "2" ) res *= 4
        else res *= 10
    }

    if(m1 === "?") res *= 6
    if(m2 === "?") res *= 10

    return res
    
    
};
```
['JavaScript']