Function definition: Difference between revisions
Content added Content deleted
m (Replaced stuff that went missing in my last edit (probably due to my dodgy connection).) |
(updated neko) |
||
Line 979: | Line 979: | ||
=={{header|Neko}}== |
=={{header|Neko}}== |
||
<lang Neko>// a function definition |
<lang Neko>// a function definition can be written either as |
||
var multiply = function(a,b) { |
var multiply = function(a, b) { |
||
a * b |
|||
} |
|||
// or |
|||
function multiply(a, b) { |
|||
a * b |
|||
} |
|||
// and calling a function |
// and calling a function |
||
$print( |
$print(multiply(2,3));</lang> |
||
'''Output:''' |
|||
6 |
|||
=={{header|Nemerle}}== |
=={{header|Nemerle}}== |