Declare

« Back to Glossary Index

As in, “to declare a variable” or “to declare a function”. This just means setting up the variable/function/etc in the code so it exists and can be used or run.

Examples of variable declarations:

default a = 1
default b = 2
default built_treehouse = True
default score = 0

Example of a function declaration:

init python:
    def clamp_number(num, amount, min, max):
        num += amount
        if num < min:
            return min
        elif num > max:
            return max
        else:
            return num
« Back to Glossary Index