There are a number of ways to do this. Two of them include:
1) Use an ajax call to ask the server for the value of some property. This would be appropriate if the property is not likely to have the value when your page is first loaded, so you need to ask later.
2) During the staging of the script, do something like this:
var valOfGreeting = "<pega:getValue param=.Greeting/>";
I'm sure it's NOT exactly that but the idea is, you use a pega tag which gets evaluated as the script is being staged so that by the time your script is staged, the above line is seen by the browser as something like