Skip to main content

Comments

A comment is a line of text that is ignored by the compiler. It's useful for adding notes to describe what's going on, or to remove a bit of code from being executed. In LemonScript, you can comment using #. The compile will ignore all the code for the rest of the line after it detects a #. For example:

var a = 5 # Declaring a variable to 5
# Check if a number is primefunc isPrime(num) {    for (var i = 2; i < num; i += 1) {        if (num % i == 0) return false    }    return true}
print(isPrime(17)) # true