UNPKG

pxt-core-own

Version:

Microsoft MakeCode, also known as Programming Experience Toolkit (PXT), provides Blocks / JavaScript tools and editors

30 lines (20 loc) 726 B
# Function A function is some amount of code you can reuse in your program. You create a function using a function _definition_ which names the function and has its code. A function _call_ is when you use a function by its name somewhere in your program. ## Defining a function A function [**definition**](/types/function/define) is a block that has the name of the function and its code. ```block function doSomething() { } ``` ## Calling a function A function [**call**](/types/function/call) is when you want to use the code in the function at some place in your program. ```sig function doSomething() { } doSomething(); ``` ### #specific ## See also [define](/types/function/define), [call](/types/function/call)