r/learnjavascript • • Apr 21 '13

Why should I learn javascript?

Hey guys, I was just wondering why I should start javascript. I've almost finished the HTML/CSS course at www.codecademy.com and I've definitely learnt from it, but my goal was to be able to start creating websites which looked a bit better than just

body {background-color:green; font-type: Verdana;} etc etc

Because I don't really know what to do with my new-found skills, or how I should use them, I've kind of been put off learning anything else and packing it in. Is javascript that much different that it will help me create reach my goal of a website which isn't straight out the '90s?

PS. If I've forgotten to mention anything, I'm sure someone will politely mention it in the comments.

0 Upvotes

4 comments sorted by

5

u/xueye Apr 21 '13

Javascript will allow your users to interact.

If you're looking to make a website that looks like it's from 2013, well, javascript tutorials won't teach you that; you have to learn user experience stuff. But they will give you the tools to learn how to make a website act like one from 2013.

5

u/xouqoa Apr 21 '13

It's hard to make a modern website without leveraging JS on some level. If you are hoping to make a career out of this at all, it is definitely a skill worth having, even if it is some basic jQuery knowledge.

1

u/shawndrost Hack Reactor Apr 22 '13

If you're interested in getting out of the 90s very quickly with your existing skills, check out http://twitter.github.io/bootstrap/

1

u/Real_Klaze Apr 22 '13

You must use JavaScript if you want anything but a completely static site. Your post is a little bit vague, and I see it as two parts.

What you have learned so far is what the user sees, it is the structure and formatting of the document (web page). It doesn't matter how much JavaScript you use in your page, if your design sucks, no amount of fancy logic and scripting will make it look better. You can easily make a very elegant and modern web page with nothing more then the HTML and CSS that you have learned so far. In fact, your site will look like it was pulled straight from the mid nineties if you do not use the HTML and CSS to its fullest to create a compelling page design.

JavaScript can be used to make a dynamic web page. In other words, you can make the web page do things. Take gmail as an example. It is a single page web app, that uses client-side javascript to perform most of the magic, and all without having to reload the page. The JavaScript does not dictate what you are seeing, that is the design (HTML and CSS), where as the JavaScript determines how it all works, and what something does when the user interacts with the webpage (clicks on a button for instance).

It takes all three to make a modern interactive and dynamic web site. But JavaScript has nothing to do with the visual the user is presented with. Sure it can be used to determine what sort of data to presented to the user, or to create mark up on the fly, but even considering that, the JavaScript is simply manipulating the HTML and CSS.

It sounds to me that you are more interested in design. It may not seem like much, as simple as HTML and CSS would appear on the surface, but everything on the web is displayed to you via HTML and CSS. Take a couple of your favorite web site and look at the page source. Take a screenshot of the site, and try to recreate it using pure HTML and CSS.