I noticed that my senior wrote a few function names start with an underscore and some are normal. For example
funtion getData()
{
return someData;
}
funtion _getData()
{
return someData;
}
When I question that, He said _getData() function more secure to compare normal function. But I didn't understand. How it becomes more secure with an underscore. Is it true? if it is true. Can you explain more detailed example?
Note: I knew about __constructor(). It starts with double underscores.