Learning Javascript

Well I know the very basics of javascipt but I’m not really not sure how to get better at it. I’ve went through most of the tutorials but still need a better understanding.

Any tips or advice of what I should do?

Thanks :smile:

Practice. Seriously, that’s generally how you get better at stuff. Just keep writing scripts, and accept that the stuff you do in the beginning will be pretty terrible compared to stuff you do later.

–Eric

Alright thanks.

Yeah I’ve noticed about 90% of my scripts that I attempt to create don’t work haha. :slight_smile:

I’ll keep practicing and hopefully I’ll get better.

Nothing says you can only do the tutorials once. :slight_smile: Also look on the wiki, which has over 200 scripts at this point, around half of which are Javascript. Most of them are relatively short, so you’re not overwhelmed with pages of code. Also, how about the Unity Game Development Essentials book?

–Eric

look through other peoples code, that is the way i learned. if you see something they do, implement it into your own code.

When I started with Unity I found it hard to understand Javascript too. It’s slightly different from languages like C#, java etc. becasue it uses functions instead of voids and is bit different in other ways as well.

I just used the 3rd person tutorial and then kept looking at scripting reference and now I know a lot of the language. I can freely write scripts and so on. :slight_smile:
That’s what you can try to do.

Although I chose to learn C# when I picked up Unity, I spent an awful lot of time in the Unity Scripting Reference - and I still do. Not only are the examples extremely handy, they also learn you how to use the Unity framework along with JS. So a bit of both, I guess.

What Eric said. You can’t become a good carpenter without cutting wood.

If you’re having trouble coming up with ideas of what to write, then just pick a random API from the manual and exercise it.

I’ve started a Java Script class. It’s for web so I know it’s not at all the same but I’m from the Art side and need to be able to ask stupid questions.

I am finding I’m picking stuff up from trying the tutorials and hanging out on the forum but not nearly fast enough and I don’t understand the basics so this class is really helping.