function scope example 1

Solutions on MaxInterview for function scope example 1 by the best coders in the world

showing results for - "function scope example 1"
Nicola
03 Mar 2019
1// The following variables are defined in the global scope
2var x = 12, y = 25;
3
4// This function is defined in the global scope
5function add(){
6  return (x + y);
7}
8
9add(); // Returns 37
10
11