Mrs Obeo ,could you please explain to me what I have been doing wrong about this code .I have been trying many hours to solve
const renderSongs = () => {
array();
}
Thank you for your concern
Serdar Tantekin
Mrs Obeo ,could you please explain to me what I have been doing wrong about this code .I have been trying many hours to solve
const renderSongs = () => {
array();
}
Thank you for your concern
Serdar Tantekin
I created a new topic for you here. In the future, it is best to use the Ask for help button which will generate your code and challenge link and create a new topic for you
your issue with your code is here
right now, that line of code says to call a function named array.
but you don’t have a function called array.
So you will need to delete that.
The directions want you to add a parameter of array instead.
here is another example on how parameters works in functions
const randomFunction = (parameter1, parameter1) => {}
parameters inside functions are used as placeholders inside your function
for example
const addTwoNumbers = (num1, num2) =>{
return num1 + num2
}
then when you call the function, you pass in the argument which represents the real values used for the function
addTwoNumbers(3,5) // returns 8
regular functions and arrow functions act in a similar way.
the main change is getting used to the new syntax for arrow functions.
but they are used alot in real world apps
hope that helps
Thank you very much Mrs Oboe at least I get it… : )
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.