Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>FDW</title>
</head>
<body>
    Ingrese un nombre: <input type="text" id="foo" autofocus /> <button id="bar">Insertar</button>
    <p id="baz"></p>
</body>
</html>
 
var bin = {},
    parrafo = document.querySelector("#baz");
bar.addEventListener("click", function(){
    var min = foo.value.toLowerCase(); //minúscula
    if (min in bin){
        bin[min]++;
    }
    else{
        bin[min] = 1;
    }
    foo.value = "";
    foo.focus();    
    //parrafo.innerHTML = "";
    for (var propiedad in bin){
        parrafo.innerHTML += propiedad + ": " + bin[propiedad] + "<br />";
    }
}, false);
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
Alexis88pro
0viewers