Skip to content

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

Notifications You must be signed in to change notification settings

Lartrax/FjordJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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;
};

About

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

Resources

Stars

Watchers

Forks