JavaScript for WordPress Forums Vanilla JavaScript JSON and Local Storage question

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #30704

    So I didn’t catch this before when I went through that part of the course, and then I started the project and I’m not finding an answer to what is likely a very easy question —

    If you save data as JSON data within a variable called ‘posts’ and you stringify it at the end of that JS file – can you reference that ‘posts’ and then parse it in another JS file within the same site?


    Never mind – I think I got this ;-)-

    Zac Gordon

    Hey Kat!

    If I understand correctly, yes, you can stringify JSON in one file then parse it in another.

    Hope that helps!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.