Slashdot Mirror


User: johnbellonejr

johnbellonejr's activity in the archive.

Stories
0
Comments
1
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1

  1. Re:Javascript is a disaster on JavaScript Creator Talks About the Future · · Score: 1

    well, it's not true really. In the following example x will have global scope and y will be local to its function:

    x=2; function test() { y = x + 3; }

    --

    That's quite wrong. Both y and x will be global scope. You just declare y with "var" in order for it to be a function scope variable. The major problem with Javascript is that it is a hodge-podge of different languages mixed together where the semantic syntax is "C-like"; so you get a bunch of programmers who are arguing over the logic of scope when they really don't understand the rules of the language well enough.