SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Jan 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how to compile .js files

    Hi:

    I'm totally new to javascript world and i'd like to learn by writing simple examples and running them, my problem is i dont know how to do that, how can i compile/interpret .js files and see the results and the errors.
    i appreciate your help.

    Regards

  2. #2
    SitePoint Zealot
    Join Date
    Dec 2010
    Posts
    187
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can't compile them, it's an interpreted language, not compiled one.

    What you can do is get Chrome, press CTR SHIFT I and use the WebKit console for debugging and taking JS apart, setting breakpoints and checking how the whole thing gets executed.

  3. #3
    SitePoint Guru team1504's Avatar
    Join Date
    May 2010
    Location
    Okemos, Michigan, USA
    Posts
    732
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Yes. Js is interpreted and can be done through any browser with javascript enabled.

    If you do not have access to the script because of file-permissions, which should not be a problem because I believe for it to be executed it has to be read, anyway one can use Firefox firebug to take it apart or Google Chrome Developer tools, which I prefer. (To access them righlick and then select Inspect Element)

    Hope that helped,
    Team 1504

    P.S. Also unlike php, javascript does not need a server to be read. It can be read straight off any computer with a browser. However, in IE, when running js from a computer than the IE is running on it will ask you permission. Once the js is on a server, it will no longer do that.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •