Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

How to avoid undefined index in Javascript

Avatar of gautam_reddyc
gautam_reddyc asked on
JavaScriptJScript
4 Comments1 Solution650 ViewsLast Modified:
Hello, I am trying to load an array with client side actions, but in the process there are a few unnecessary fields loading in. They have a blank id and a value of undefined. How can i avoid these undefined values to load into my array.

When I tried to get them by using a conditional if loop where the value == 'undefined', they still load into the array. Is there a remedy for this. There are a lot of these, so using this array has been a problem.
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971Flag of Guadeloupe imageMultitechnician
Commented:
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answers