Ciao.
Codice PHP:
function sayHello2(name) {
  var 
text 'Hello ' name// local variable
  
var sayAlert = function() { alert(text); }
  return 
sayAlert;

Sto facendo un po di confusione
leggo:
In JavaScript, if you use the function keyword inside another function, you are creating a closure.
qui


ma sayAlert non è anche un metodo
privato di sayHello2 e text una proprietà
sempre privata di sayHello2 ?