41235 itâs right the answer of the test.
the other are just console.log to check my work.
and if you read my post i have already posted the result in the pic given.
no, âthe othersâ are a part of a single console.log statement, the function return value is that, not just â41235â, and also itâs a string (not an array as the tests require), I solved this challenge now within half a minute, so can you please use my advice? because I know what Iâm talking about
There are several points to consider:
1: the + operator is not really doing what you think itâs doing.
In this case, the fact that your operators are not number means that the JS engine attempts to convert the values into string and concatenate them.
meaning that your arr3 is a string and not an array.
let a1 = [1,2,3]
let a2 = [4,5,6]
typeof (a1 + a2) // string
2 - Splice change the Array in place, meaning that arr2 wonât be the same after, and the challenge specifically ask you to not modify the arguments passed.
3 - arr2.splice(n, 0, arr1); you are effectively inserting an array inside arr2, meaning that the final result will be an array inside an array (a 2d array)
like
I appreciate your kind words, but, @harel_avv tried to help as well, and he deserve any praise and recognition as well.
Reading at his comments (they) said pretty much the exact same things
Also please remember that many people here is hanging around âvolunteeringâ their free time just to help others, and thatâs a BIG enough reason to be thankful to everybody regardlessâŚ
you are right and sure harel said the same things but not in the same way.
as i understand that you all here to help us free, you understand that i need an explanation to improve. a simple explanation.
as you can see the first answer of Harel, he was not explaining my fail. he just told me to study splice.
Now, I donât want to digress too much as it is off-topic, but with hope that this may help you in your future endeavor @marcocbnet.
That is probably the best advice for your growth.
50% of developing software is making research and reading tons of documentation. So you have to get used to read - re read and read over and over again documentation⌠because thatâs what you will do.
Moreover you will learn a great deal more if you do your own research.
Learning to learn, and to search for answer is a great asset to have as a software developer, that in general will be required for any job: none expects you to know everything, but companies/coworkers will expect you to find answers on your own.
Thereâs a difference in approaching a problem asking
âwhy x doesnât workâ
compared to
"why my âxâ has this precise behavior when according to âyâ it should be âzâ "?
Sometimes âread the docsâ is the best advice, or âthe soleâ advice you will get, so itâs something to learn to live with
Just for context at my workplace we have a small chatbot that link to internal documentation, and often in the team chat you read someone asking
âhey do you remember [thing?]âŚâ
which is often replied with
âI think itâs [link to doc]â
We should introduce a forum bot with zero social skills that just answers every question with a link to the docs, signing each post with âwelcome to your life as devâ
This time i donât agree with you. why did you explain everything step by step instead of tell me to study? Because i need to understand before study. And thatâs why your help is so important for me. you didnât give me the solution, you gave me the comprehension to understand the problem.
when you and you collegue share the same document is because you are on the same level. if you share your library with me i couldnât understand a single line of code, even if i study a month