1
The function verificaCampoVazios
has two parameters (fs
and campos
).
verificaCamposVazios = function (fs, campos)
{
console.log(campos[0]);
}
Example of how it is called function:
verificaCamposVazios(fsInformacaoCandidatoDados, ArrayCamposNaoObrigatorios);
How do I call the function without passing the parameter campos
?
I called the function so:
verificaCamposVazios(fsInformacaoCandidatoDados);
And the function was not executed, but did not show error in console.log
of Chrome
.
I would like to understand what I call the function without passing an argument.
Have you tried
verificaCamposVazios(fsInformacaoCandidatoDados, null);
?– Bacco
I’ll try now
– durtto
It is OK to call the function with less arguments... -> https://jsfiddle.net/7dnc5kh0/ you can create a jsFiddle that plays the problem?
– Sergio
I thought that when the argument was not passed, the Function argument was already null
– durtto
with null gives error too.
– durtto