var test = function(msg) {
alert(msg)
};
(new test("hi")).run();
(new test("hello")).run();
When I run above javascript code, I am able to get alert "hi". But alert "hello" is not coming up.
- Anybody can explain what is above, I am completely new to this. Only I know is that "test" is a function
What is run() method does?, because when I removed run in the above code, I am able to see both alerts, pls help...
var test = function(msg) { alert(msg) }; (new test("hi")); (new test("hello"));