July 2018
Intermediate to advanced
400 pages
12h 14m
English
Take a look at how you call the printPlayerStatus function, passing arguments as parameters:
printPlayerStatus("NONE", true, "Madrigal", status)
Another way you could call the same function is:
printPlayerStatus(auraColor = "NONE",
isBlessed = true,
name = "Madrigal",
healthStatus = status)
This optional syntax uses named function arguments and is an alternative way to provide arguments to a function. In certain cases, it grants several advantages.
For example, using named arguments frees you to pass the arguments to the function in whatever order you would like. For example, you could also call printPlayerStatus like this:
printPlayerStatus(healthStatus = status, auraColor = "NONE", name = ...
Read now
Unlock full access