Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JavaScript Algorithms and Data Structures
- Basic JavaScript
- Store Multiple Values in one Variable using JavaScript Arrays
- With JavaScript array variables, we can store several pieces of data in one place.
- You start an array declaration with an opening square bracket, end it with a closing square bracket, and put a comma between each entry, like this:
- const sandwich = ["peanut butter", "jelly", "bread"];
- Modify the new array myArray so that it contains both a string and a number (in that order).
- for more:http://besturl.link/idJPpVI
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement