And how to use javascript function as toUpperCase() etc.
var upper = text.toUpperCase();
First case: you’re not writing javascript here, no need for quotes or plus sign.
Second case: you need to have a return statement or to use the #{} syntax that does it for you.
Note: please include the property names in your screenshots, it’s not always obvious which property you’re editing.