Help with a simple app using Javascript


Good afternoon. I am teaching a coding class and since Android studio doesn’t work with the school district software, I wanted to show students a simple NativeScript program using Javascript that will ask the user to enter 2 numbers, multiply by eadh other and store in a variable, and display the result. I’m having a tough time with it and would appreciate some help. The code is attached.


Looks like you are calculating while page is loading, you are supposed to wait until user enter his values? May be you can have a button and let him click it after entering values to show results.


okay, i’m a bit confused on which script should my calculations go? and how to send the total back out to a textfield. any help is appreciated.


You may add it to a click event or text change event. Bind value to model so it reflects in textfield.

Please go through the getting started guide for best development experience.