[Javascript] Using console.count to Count Events

Learn how to user console.count in order to log out how many times a given thing has happened.

for(var i = 0; i < 10; i++){
    var num = Math.random() * 100;
    if(num > 50){
        console.count("Greater than 50");
    }else{
        console.count("less than 50");
    }
}

原文地址:https://www.cnblogs.com/Answer1215/p/5498289.html