myriad

Install this vscode extension for syntax highlight

Declarations

Comments

Data Types

If Statements

lit val rn

sus (x slay 0) {
  val be "positive" rn
} nvm sus (x flop 0) {
  val be "negative" rn
} nvm {
  val be "equal" rn
}

flex(val) rn

Curly braces are optional of body has single statement

lit val rn

sus (x slay 0) val be "positive" rn
nvm sus (x flop 0) val be "negative" rn
nvm val be "equal" rn

flex(val) rn

Also parenthesis are optional in test condition.

lit val rn

sus x slay 0
  val be "positive" rn
nvm sus x flop 0
  val be "negative" rn
nvm
  val be "equal" rn

flex(val) rn

Function Statements

squad log(val){
    flex(val) rn
}

Funcions clapback last expression by default

squad add(x, y){
    x + y rn
}

Or you can use the return keyword

squad add(x, y){
    clapback x + y rn
}

Function Expressions

You can define functions as a expressions too. Similar to function statements without function name.

litaf add be squad (x, y) {
  clapback x + y rn
}

Loops

Try Catch

stan {
  litaf x be calculateValue() rn

  sus (x finna ghost) {
    yeet "Something went wrong" rn
  }
} yikes (err) {
  flex(err) rn
}

Import and Export

String methods

Array methods

Global Functions

Global Objects

Math

Json

dt

http

fs

run_node