how to use a javascript function to return math html code example Example: return value from javascript function function num(x, y) { var sum = x + y; return sum; }