I'm trying to develop this code but an error occurs :
Move 'var' declarations to the top of the function. for (var i = 0; i < extractPassword.length; i++){
The code:
var extractPassword = (['a', 'z','c']);
var newPass = [];
for (var i = 0; i < extractPassword.length; i++){
var x = extractPassword[i];
if ('a' <= x && x <= 'z') {
newPass.push(0);
}
}
return newPass;
Can you please help me correct it ?