/    Sign up×
Community /Pin to ProfileBookmark

Creating a string based on multiple values

Hi. I have 8-9 address values that I retrieve via JSP. The fields are:
Address1
Address2
Address3
City
State
Zip
Postal Zone
Country
Consular Code

Some addresses are US and some are foreign. Based on these values, I need to create a string with each part separated with a comma. How can I accomplish this and eliminate the values that are null?

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @bigkahuna7569 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...