Skip to content

Latest commit

 

History

History
74 lines (50 loc) · 1.03 KB

README.md

File metadata and controls

74 lines (50 loc) · 1.03 KB

FjordJS

FjordJS

A Norwegian JavaScript transpiler


This project is a demo allowing written Norwegian to be converted into JavaScript.

Example:

Norwegian JavaScript
La tallet være 99.

Konstant utsagn bruker tall, gjør  
Konstant mindre er tall minus 1,
Loggfør tall plus
" bottles of beer on the wall\n" plus tall plus
" bottles of beer\ntake one down pass it around\n"
plus mindre plus " bottles of beer on the wall".

Imens tallet overgår 0,  
utsagn med tallet,
tallet blir tallet minus 1.






let tallet = 99;

const utsagn  = ( tall ) => {
    const mindre = tall - 1;
    console.log(
        tall +
        " bottles of beer on the wall\n" +
        tall +
        " bottles of beer\ntake one down pass it around\n" +
        mindre +
        " bottles of beer on the wall"
    );
};

while ( tallet > 0 ) {
    utsagn ( tallet );
    tallet = tallet - 1;
};