Writing Your First Program

Below is a step by step on how to compile your first program!


In this example one will be creating a hello world program that will accept a type string 'name' and it will return a type of string.

Step 1: Create the function


Below you will create the function for your first program




In this example you have created a function called helloWorld. This function accepts a type 'string' and is called 'name'. It will also return a type of string which is indicated at the end of the closed parenthesis ') : string'

Step 2: Create return string variable


Below you will take the variable passed into function and store it in a string to later be returned. It has also added the string "Hello " at the beginning of the variable named 'result' to make the final result say 'Hello {SomeName}'




In this example it has created a function called helloWorld. This function accepts a type 'string' and is called 'name'. It will also return a type of string which is indicated at the end of the closed parenthesis ') : string'. This function also now stores the variable name that is passed into it into the variable 'result'.

Step 3: Return the String


Below will take the variable passed into function and store it in a string to later be returned. You have also added the string "Hello " at the beginning of the variable named 'result' to make the final result say 'Hello {SomeName}' will now return that result.




In this example you have created a function called helloWorld. This function accepts a type 'string' and is called 'name'. It will also return a type of string which is indicated at the end of the closed parenthesis ') : string'. This function also now stores the variable name that is passed into it into the variable 'result'. We now when the method is called it will return the variable 'result'


Video Intro to Web IDE

An error has occurred. This application may no longer respond until reloaded. Reload 🗙