Schnappi Posted March 19, 2020 Share Posted March 19, 2020 The JavaScript Array Methods (Merging an Array with Values) example doesn't use array in it's example, it still uses an array like in the examples above it. The square brackets in the argument to concat should be removed, leaving 3 separate string arguments. I think example could be improved to something like: var arr1 = ["Cecilie", "Lone"]; var nephew = "Nick"; var myChildren = arr1.concat("Emil", "Tobias", "Linus", nephew); Link to comment Share on other sites More sharing options...
Ingolme Posted March 19, 2020 Share Posted March 19, 2020 On which page is the example? If there is a mistake on the site, click on the "REPORT ERROR" link at the bottom of the page that has the mistake so that the W3Schools staff will see it. Link to comment Share on other sites More sharing options...
Schnappi Posted March 23, 2020 Author Share Posted March 23, 2020 O, hadn't seen that button. But that only gives me an emailaddress. Mailed the text above to it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now