Can I have a function as part of another function?

Like print.InGame(msg) or math.Solve(num,plus) as part of one functions? I’ve seen stuff like this before no clue if it works…

function math(){
this.Solve = function(num,plus){print(num+plus)}}
math.Solve(1,2)

Use classes, that’s what they are there for.

This will teach you classes in js http://www.unifycommunity.com/wiki/index.php?title=Head_First_into_Unity_with_JavaScript#It.27s_Fast