Myna Write Tutorial

Newcomers to Myna will find the syntax for some common things just a little different than other languages. With files that end in ejs, html code can be interwoven, but sometimes, you want to just write a line in code. There are two ways to do this.

The Myna.println("hello") function will print the text passed to it as well as a "<br>" for a html carriage return.

Myna.print("hello") will print the text and nothing else.
Myna.print() is equivalent to $res.print(). It is recommended to use Myan.print() as should there ever be a change in the underlying platform, it can be done at the global level with Myna.

Here is the sample code:

<%
var hello = "hello";
Myna.println(hello);
 // or
Myna.print("Hello World")
%>