Click to show TOC

Introduction

This is a very simple TryITjs file. It has only one page.

Code example

This is a simple code example to create a javascript array and display it.

Press the RUN button to execute the code (you can eddit the code and run again if you like)

 
 
     

What just happened, if you execute the code above it will display the array just created.

Note: the last expression array is displayed.

Content of basic.try (generated this content)

Showing a .try file

Below you will find the contents of basic.try file use to generate this page

!head
  ~~lt%%title~~gt%%First Tryit~~lt%%/title~~gt%%
  @@include tools/head.try

!md 
  # Introduction
  This is a very simple **TryITjs** file. It has only one page.

  ## Code example

  This is a simple code example to create a javascript array and display it.

  Press the RUN button to execute the code (you can eddit the code and run again if you like)


!tryit
  var array = [ 'a String', 1 , { name: 'tryit'} ]; // array with a `string`, `number`, and an `object`
  array // the last expression is always displayed (except if the value is undefined) 


!md
  **What just happened**, if you execute the code above it will display the array just created. 

  __Note: the last expression `array` is displayed.__




  ## Content of basic.try (generated this content)
  ### Showing a .try file

  Below you will find the contents of basic.try file use to generate this page


  ```tryit
     @@include ESCAPE basic.try
  ```
  ### Showing a .try file

  The code snippet below will render the contents of a try file. Note, the __@@include__ must be followed by the
  word __ESCAPE__ to let the processor know the contents of the file is for display (ESCAPE tells the system not to process the contents as .try instructions )

!html
  ~~lt%%pre style="color: blue; font-size: 1.5rem;"~~gt%%
  ```tryit
     \@@include ESCAPE basic.try
  ```
  ~~lt%%/pre~~gt%%

!md
  ## Files included

  Including a file using `@@include filePathOrURL` will copy the contents into the file. The basic.try file includes
  the __tools/head.try__, you can see it's content below.

  ```tryit
     @@include ESCAPE tools/head.try
  ```

Showing a .try file

The code snippet below will render the contents of a try file. Note, the @@include must be followed by the word ESCAPE to let the processor know the contents of the file is for display (ESCAPE tells the system not to process the contents as .try instructions )

```tryit
   @@include ESCAPE basic.try
```

Files included

Including a file using @@include filePathOrURL will copy the contents into the file. The basic.try file includes the tools/head.try, you can see it's content below.

!head
~~lt%%meta name="viewport" content="width=device-width, initial-scale=0.7"~~gt%%
~~lt%%script src="https://cdn.jsdelivr.net/npm/lodash@4.17.15/lodash.min.js"~~gt%%~~lt%%/script~~gt%%
~~lt%%link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.2.0/build/styles/solarized-light.min.css"~~gt%%
~~lt%%style~~gt%%
img.screenshot {
  margin-left: 7rem;
  width: 20%;
  height: auto;
  transition: 1s width, 1s height;
}

img.screenshot:hover {
  margin-left: 2rem;
  width: 80%;
  height: auto;

}
~~lt%%/style~~gt%%
!md



Page - 1