Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@karma the wrong one I guess.
Good thing, I have to only survive this for a limited time. -
funkyboss696yIt might make sense. Using the length method may be more resource intensive than calling it once, assigning its value to a variable, and using the variable from there on out. Unless that length method returned value is changing along the way, then you may need to use the more resource intensive method.
-
@funkyboss in this course they don't care about efficiency, just that it works. However the way they wanted to have it is as we converted a collection to array before, they wanted us to save the counter of elements there and use it in the for loop.
Related Rants
-
fabiomsnunes22Stupidest client ever: I once had a client that requested me a new website, all went well and get paid. After ...
-
Coffe2Code13~During app demo to our client~ - And when you click here the request will be submitted, the admin will be no...
-
watzon20This is what happens when you listen to clients
RANT: So in school, we have to program using some kind of pseudocode.
Today we wrote an algorithm from a previous exam. Apparently, they don't give you a mark if you get the Array.length(). To receive the mark you have to have to use a variable.
WHICH MAKES ABSOLUTELY NO SENSE TO ME.
My teacher said it would even be ok to define a variable like Variable = Array.length. THAT MAKES EVEN LESS SENSE
rant
pseudocode
stupid
ib