Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
var clientes = [
    {nombre: "Juan", ropa: "Pantalón"},
    {nombre: "Luis", ropa: "Camisa"},
    {nombre: "Martín", ropa: "Gabán"}
];
function buscar(nombreCliente){
    for (var i = 0, t = clientes.length; i < t; i++){
        if (clientes[i].nombre == nombreCliente){
            console.log(clientes[i]);
            break;
        }
    }
}
buscar("Juan");
buscar("Luis");
buscar("Martín");
Output

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

Dismiss x
public
Bin info
Alexis88pro
0viewers