Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (85,101 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

Sign in to follow this  
GentlemanSquid

JavaScript for a beginner.

Recommended Posts

GentlemanSquid

I know some of the basics, but the stuff I learnt is stuff like var, if, else and such, then I look at something like this (below) and I can't even begin to understand it.

 

http://d24w6bsrhbeh9d.cloudfront.net/js/gag.min-v1.7.6.js

 

 

Also, could someone answer this. http://www.gtaforums.com/index.php?showtop...st&p=1060755348

Share this post


Link to post
Share on other sites
K^2

You need to learn about functions, classes, and objects.

Share this post


Link to post
Share on other sites
GentlemanSquid

I have learned the basic bits of those, but they never tell you any of the harder or different bits like on the example.

Share this post


Link to post
Share on other sites
K^2

That's because you are supposed to write your own code and figure out a lot of these things by trial and error. Programming is not something you can learn by just reading the books. You have to get your hands dirty.

Share this post


Link to post
Share on other sites
Suction Testicle Man

What K^2 said - writing code yourself is essential to learning anything. Though don't bother studying the code in the link you posted - that 'min' in the filename means it is code that has had all line breaks, indentation and comments removed in order to minimise the filesize (in an attempt to lighten the load on bandwidth and page loading times). Obviously this makes it a lot less readable to a human.

Share this post


Link to post
Share on other sites
GentlemanSquid

Thanks, guys. Yeah I guess the best way to learn is by getting my hands dirty, that is basically how I learned html and css.

 

@STM - I viewed it with developer tools, so it was formatted correctly. image

Share this post


Link to post
Share on other sites
Swoorup

It looks like most of the language are derived from C or C++. Their syntax is basically the same. Except for VB

Share this post


Link to post
Share on other sites
K^2

I wouldn't say that. It's just a useful enough syntax that it gets picked up for many scripting languages. JS and PHP, for example. But there are plenty of other languages with different syntax that still find common use. Fortran's syntax is a lot more like BASICs. Delphi is basically Pascal, so it gets syntax from it. Python and Lisp stand on their own. Prolog's syntax will make you go a little insane, and Perl will ruin whatever sanity is left afterwards. Oh, and don't get me started on Brainf*ck.

Share this post


Link to post
Share on other sites
Swoorup

 

+++++ +++++             initialize counter (cell #0) to 10[                       use loop to set the next four cells to 70/100/30/10   > +++++ ++              add  7 to cell #1   > +++++ +++++           add 10 to cell #2    > +++                   add  3 to cell #3   > +                     add  1 to cell #4   <<<< -                  decrement counter (cell #0)]                   > ++ .                  print 'H'> + .                   print 'e'+++++ ++ .              print 'l'.                       print 'l'+++ .                   print 'o'> ++ .                  print ' '<< +++++ +++++ +++++ .  print 'W'> .                     print 'o'+++ .                   print 'r'----- - .               print 'l'----- --- .             print 'd'> + .                   print '!'> .                     print '\n'

 

 

Its really a brainf*ck. LOL

 

EDIT: Yeah I learnt prolog was a declarative language

Edited by Swoorup

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.