I’m not being able to assign values to variables

Asked

Viewed 79 times

-3

I am trying to assign values to some variables and am not succeeding, in calling a step function a parameter which I am receiving correctly, but try to pass this and another value as parameters I cannot.

I did that:

function BuscaDados(pIdAgenda) {    
    var params = {
        Operacao: 'BuscaUnica',
        pIdAgenda: pIdAgenda
    };
}

Executing the console.log of the variable sent to the Search function the value is correct, but when trying to assign them to params and running the console.log what I get is [object Object]

  • puts it like this console.log(params) that it will return all the content of the object is what you want to see ? Because the way you assigned it Operation and pIdAgenda the variable params she has rather become an object

2 answers

2


function BuscaDados(pIdAgenda) {    
var params = {
    Operacao: 'BuscaUnica',
    pIdAgenda: pIdAgenda
}; 
return params;

}

Search data(123);

-1

Function Search Data(pIdAgenda) {
var params = { Operation: 'Search only', pIdAgenda: pIdAgenda }; Return params;

Browser other questions tagged

You are not signed in. Login or sign up in order to post.