Previous Livestreams
You can find all of our livestreams here!
StartKey Concepts
Review core concepts you need to learn to master this subject
Return Keyword
dplyr package
data frame object
Excluding Columns with select() in Dplyr
rename-dplyr
Loading and Saving CSVs with R
filter with logical operators
Dplyr’s filter()
Return Keyword
Return Keyword
static int ReturnAValue(int x)
{
// We return the result of computing x * 10 back to the caller.
// Notice how we are returning an int, which matches the method's return type.
return x * 10;
}
static void Main()
{
// We can use the returned value any way we want, such as storing it in a variable.
int num = ReturnAValue(5);
// Prints 50 to the console.
Console.WriteLine(num);
}
In C#, the return
statement can be used to return a value from a method back to the method’s caller.
When return
is invoked, the current method terminates and control is returned to where the method was originally called. The value that is returned by the method must match the method’s return type, which is specified in the method declaration.
Learn Python: Hello World
Lesson 1 of 1
What you'll create
Portfolio projects that showcase your new skills