Skip to main content

JavaScript specific

There are a few operators in Una for compatibility with JavaScript

Class instantiation#

Symbol: new.
Translated to JavaScript typeof operator.
It takes 1+ parameters: the first one is class name and the rest are constructor parameters..

new Date
new Date ()
new Cat "red"

Type of#

Symbol: typeof.
Translated to JavaScript typeof operator.
It takes 1 parameter.

typeof 'Hello'

Instance of#

Symbol: instanceof.
Translated to JavaScript typeof operator.
It takes 2 parameters.

instanceof func Function