Need help with forEach method

hey guys please take a look at this:

<!DOCTYPE html>
<h1>JavaScript Arrays</h1>
<h2>The forEach() Method</h2>

<p>Call a function for each array element:</p>

<p id="demo"></p>

const fruits = ["Banana", "Orange", "Apple", "Mango"];

let text = "<ul>";
text += "</ul>";

document.getElementById("demo").innerHTML = text;

function myFunction(value) {
  text += "<li>" + value + "</li>";


in this code i don’t get it why it used "value " at the end of the code. it’s not declared anywhere. “item” was also used in another code the same way as this one.

Its being used in the parameter (value). That is just like a placeholder. When you actually call the function value will be replaced with an actual value. That value is then used at the end of the code like you see.

So for example when I call the function

myFunction(“hi”) {

Where you made that function value will be “hi” even though you are using the word value