Getting properties and applying JavaScript methods directly to variables. - Forum

Forum Navigation
You need to log in to create posts and topics.

Getting properties and applying JavaScript methods directly to variables.

As you know you can use the syntax [myVariable] to show the value stored in myVariable.
But this is also possible:

Displaying or getting a property:
[myVariable.lenght] will show the number of characters stored in myVariable.

Displaying or getting a JavaScript method result:
[myVariable.toUpperCase()] will show the value stored in myVariable but transformed to upper case.

More information about available methods for string variables:
https://www.w3schools.com/JSREF/jsref_obj_string.asp

 

Vadim, asmat and José María Torres have reacted to this post.
VadimasmatJosé María Torres

Attached is a very simple sample app.
Regards.

Uploaded files:
  • You need to login to have access to uploads.
Vadim, CN_Iceman and 3 other users have reacted to this post.
VadimCN_IcemanasmatnoyzenJosé María Torres

Gracias Luis eres genial!