makoto (owner)

Revisions

gist: 229855 Download_button fork
public
Public Clone URL: git://gist.github.com/229855.git
Embed All Files: show embed
Text only #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## Ruby
def foo
  p 'hello' # Should be called only once
  return 'some config'
end
 
CONFIG = foo
 
p CONFIG
p CONFIG
 
 
//Javascript
 
function foo(){
  alert('hello'); // Should be called only once
  return 'some config';
}
 
CONFIG = foo();
 
alert(CONFIG);
alert(CONFIG);