2 errors:
First that there is no div with id = divValor.result[2]
, you are using label for all values.
Second error result[n]
must be inside function success: function (result)
var Valor;
$(document).ready(function(){
$("#btnSend").click(function(){
$.ajax({
url:'@Url.Action("VerificaCep","ConsultaCep")',
type: "GET",
contentType:"application/json",
data: { cep: $("#txtCep").val() },
success: function (result) {
$("#divValor").html("<label>Endereço:" + result[0] + " Bairro:" + result[1] + " Cidade:" + result[2] + " Estado:" + result[3] + " </label>");
valor = result[2];
console.log(valor);
},
error: function(xhr, exception){
alert("Favor digitar o CEP!")
}
});
});
});