Thursday, June 18, 2020

How to use JAScript app

Create script
Open the editor, write your code, then click run. After you complete editing click save icon, enter the name of your script then click OK in order to save your script.

Create a project
Click Apps icon then swipe left to open projects tab. Open the menu then click new option, enter the name of your project and click OK. You will be redirected to the editor where you write your code then save. In a project you can add multiple scripts and resources such as images.

Create an app
Long click on a project item, in the popup menu that appears select Build app. Your .jpk app will be saved in the JAScript folder.

Change theme
Go to settings click on App, then click Theme, finally select the color themes provided.

Change editor syntax theme
Open the editor, open menu , select tools, click syntax theme, then select a theme from your storage. After that head to the editor syntax settings and toggle custom syntax highlight on.

Update apps
After update of JAScript app some apps may also be updated, in order to show updated JAScript apps in the Apps tab, open menu then click refresh.

Strict mode
Open settings, click javascript then toggle strict mode on.

Auto fix errors
In the editor open menu select tools then click Fix Some Errors. Currently it only fixes missing ; after satement error. This function works only in strict mode.

Format
Formats codes in a way that makes it more appealing and readable. Ensure first that your code runs in strict mode before performing this action else it might not format properly.

Debugging
You can debug your code line by line by inserting debugger statements in your code. When debugger statement is reached a popup window will appear containing details about the variables with options to exit, step line by line and move to the next debugger statement.

Console
Shows all strings added to logcat with print statement.

2 comments:

JavaScript Syntax

Whitespace and new lines JavaScript ignores spaces, tabs, and newlines that appear in JavaScript code. You are free to fo...