Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

129
Views
how do I create a variable that points to a string with an object from another variable? I am a newb and I am doing Colt Steeles web dev boot camp

I apologize in advance if I worded the question wrong but I have this issue.

const restaurant = {
    name: 'Ichiran Ramen',
    address: `${Math.floor(Math.random() * 100) + 1} Johnson Ave`,
    city: 'Brooklyn',
    state: 'NY',
    zipcode: '11206',
}

I am supposed to create a new variable that contains the address, city, state and zip but I am not to sure how to do that.

So far I've tried:

const fullAddress = address.city.state.zip

but I get an error saying that I have not defined the full address variable. I am really not sure what to do next and I have re-watched the video about 5 times now and I am totally lost. any help would be much appreciated.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Do You mean: const fullAddress = `${restaurant.address}, ${restaurant.city}, ${restaurant.state}, ${restaurant.zipcode}` ? Please notice that it's not creating a binding between an object and a built string.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!