Making a function to return an object from an ArrayList - Treehouse
Jan 23, 2020 ... It looks like you mixed up java data structures: Array and ArrayList. In the class declaration you say "static ArrayList <Person> list" but your ...
Jan 23, 2020 ... It looks like you mixed up java data structures: Array and ArrayList. In the class declaration you say "static ArrayList <Person> list" but your ...
Aug 29, 2014 ... The function must return the length of an array passed in or 0 if a 'string', 'number' or 'undefined' value is passed in." I am on Stage 5 of ...
Back to question,if you use the ".length" to test undefined, it will return numeric 9. Besides, if I take other string to your function, it would return numeric value, won't equal to "undefined". EX: "hello".length = 5 "hello" is a string , not array , but its length != "undefined" .
For example, Python arrays are homogeneous and can only hold data of a single kind. The type does take up much less space in memory than Python lists however so ...
Return values please help. function arrayCounter(array) { return array.length; }else{ array.length === 'string', 'number' , 'undefined'; return 0Here's the code from that example. Hope this helps.
Feb 22, 2019 ... Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you' ...
The function must return the length of an array passed in or 0 if a 'string', 'number' or 'undefined' value is passed in.I don't like how it's asking you to pass a parameter as an array, but absolutely no mention, or examples of arrays being passed as parameters are mentioned in the video.
Jul 7, 2016 ... So...I have an assignment in which I am supposed to produce an array of 100 random integers in a 10x10 rectangle (done) and produce a list ...
The code challenge reads: Around line 17, create a function named 'arrayCounter' that takes in a parameter which is an array. The function must return the length of an array passed in or 0 if a 'string', 'number' or 'undefined' value is passed in.
May 16, 2017 ... Is there a preference or a difference? The output on java-repl seems to be the same. List<String> ...
Mar 10, 2015 ... I finally managed to do it! i couldn't do it by passing the first_4 and last_4 functions so instead i just got the function to return 2 lists ...