Do You Need Go Know Css for Javascript
Why JavaScript should be your first Programming language
Tell me, why the majority of people who determine to join the gym in January can't continue till March?
Because they get too hard the very first twenty-four hours.
Similarly, when learning programming for commencement time, if you expose yourself to lots of new theoretical concepts earlier you even write your first lawmaking, so you automatically lose your interest within few days.
There are two key factors to learning any new skill:
- Depression bulwark to entry
- Instant feedback
JavaScript has both. It is very easy to get started with, and yous tin can see visible results with the minimum amount of code compared to other languages.
But I don't know HTML and CSS
Yes, yous will have to learn HTML and CSS too, because that'south how yous display things. JavaScript runs behind the scenes and interact with HTML and CSS to make changes on the screen.
You will accept to lawmaking the GUI (Graphical User Interface) in HTML and CSS.
Still, doing GUI in other languages is much more circuitous than doing it in HTML and CSS. For example, let'due south create a square box with HTML:
<div style="width: 100px; height: 100px; background-color: ruby-red; edge: 1px solid gray;">
</div>
This creates a 100x100 px box, with red background, and 1px solid gray colored border. And "div" stands for sectionalization. Anything yous don't go there?
It's easy, right?
To make this same box in any other linguistic communication, you would accept to import some GUI library kickoff, then create a window, so handle that window, and so you get to lawmaking the box on that window.
Those first three extra steps tin can easily discourage you and destroy your interest in coding.
When learning a new skill or cultivating a new habit, a low barrier to entry is vital for maintaining the consistency.
I hate it when I have to explain 13 complex concepts to students earlier teaching them to print "Hi!" in GUI.
Only why am I putting a lot of weight on GUI? Because the GUI results experience more tangible.
Creating a figurer to add numbers in a black and white console is really a irksome shit for beginners. Moving boxes on screen when we click on information technology feels awesome. Information technology encourages the beginners to learn more, instead of giving up early.
Okay, back to our question:
Will you need to learn HTML and CSS to learn JavaScript?
Yeah.
And that's not a disadvantage, it's actually an advantage.
Information technology'due south a good idea to brand the GUI in HTML and CSS, that way you lot learn 2 more technologies, that can be applied to web and mobile.
In fact, HTML and CSS are so good and piece of cake for creating GUI, that many other languages are starting to adopt information technology as their way of creating GUI.
So, learning HTML and CSS is not only easy compared to learning GUI in other languages, information technology is more useful too.
If you have never coded any HTML and CSS, and then this tutorial will get you lot started: Batman'south Love Letter in HTML — your first HTML code
Things to avert when learning JavaScript
When I say JavaScript should be your first programming language, I mean plain vanilla JavaScript that works in your browser out of the box.
No Nodejs, no React, no TypeScript, no jQuery — only plain JavaScript.
Also, many new features are introduced to JavaScript every year. If you tin't decide if you lot should learn it or not, hither'south a shortcut for you lot: if your browser doesn't back up information technology, don't dive into it. Period.
I want to repeat ane specific thing — no jQuery.
I started my journey into JavaScript with jQuery, like many self-taught beginners practise, and I regret it. I wish I would have invested a petty more endeavor in learning plain JavaScript showtime.
A brief background of JavaScript and where it's heading towards
I believe before learning a language, you must know why information technology exists at first place, and where information technology is going.
So here's a brief journey of JavaScript.
When the primeval Web browsers were released, people soon realized that they needed a scripting language to make the websites more interactive. Web developers badly wanted these functionalities:
- Logic handling: HTML and CSS only define the expect of a website, they don't handle any logic. Example utilize: To show an error bulletin if the user forgets to fill a mandatory field in a course. Here we need to handle the logic that checks if a field is mandatory and is left empty.
- Data handling: Before JavaScript, you had to ship the data to server, then procedure it in server, and then send information technology back, because there was no fashion to procedure information within browser. Example employ: Show preview of a post before saving information technology. Here we demand to update the preview with the data a user entered without sending it to server.
- HTML & CSS manipulation: Spider web developers badly needed some fashion to programmatically access and manipulate HTML elements and their CSS styles. Example use: To give the empty grade field a red boundary, showing that the user must enter the required data in the field. Here nosotros demand to requite a reddish boundary to an element from script.
- Outcome Handling: Whatever scripting language volition not exist of much utilise if it can't capture and handle user and browser events. Case use: Add together an particular to cart when "Add to cart" push is clicked. Here we demand to handle the "click" event on the "Add together to Cart" button.
- Communication: Earlier JavaScript, the only fashion to send data to server from a website was through "forms". This imposed a big constraint on web developers. Example use: when you lot want to communicate with server just don't want the user to submit a form for it.
These five major reasons gave birth to JavaScript. JavaScript has all these features.
Now let'south look at where JavaScript is going towards:
- Server-side development: NodeJS opened a large platform for JavaScript developers. Now you tin make desktop and server application in JavaScript, without any need of a browser. Yep, JavaScript outside browsers.
- Mobile development: In that location are a number of actor in this field which allows you to make mobile apps with HTML, CSS, and JavaScript. React Native allows y'all to write native mobile apps in JavaScript. That's so absurd!
- Faster JavaScript engines: The big fishes in the marketplace — Mozilla, Google, and Apple tree — they are all competing to build the fastest JavaScript interpreters within your browsers making the web apps near every bit fast as native apps.
So, if you lot know JavaScript, you tin can make Web Apps, Server Backends, Desktop Apps, and Mobile Apps. There'due south hardly any language that covers such wide range of applications.
Only JavaScript is not a Programming language. It'south a scripting language!
Yes, I tin already hear a lot of people who've read a couple of wiki manufactures shouting the above sentence.
The thing is, does it matter?
With the wide varieties of applications that yous tin make, plus the enormous amount of career opportunities it opens, there is no reason for categorizing it every bit a scripting language or a programming language.
The of import thing is — it gets shit done bro!
Career Opportunities with JavaScript
It's no surprise that majority of success stories posted on Reddit and other forums are about how a self-taught programmer got a Frontend Development job in a big It firm or a local Startup.
Because Frontend development (HTML + CSS + JS) is the easiest and fastest path to get a career in programming.
Here are some advantages if you are starting your journeying with HTML, CSS and JavaScript:
- Frontend Developer: Avg Bacon: $76,200
- Node Developer: Avg Salary: $91,668
- Full Stack Developer: Avg Bacon: $110,597
- Remote job opportunities: work from whatsoever corner of the globe
- Piece of cake to get freelance work compared to other languages
- Easy to build portfolio compared to other languages
Problem with most online Tutorials and Courses
I believe the fastest way to teach someone a new skill is to start with the fun stuff, and teach the boring things later down the road.
Unfortunately, most of the online tutorials and courses practice the opposite. They teach the boring concepts offset, and the student lose their interest and willpower before the fun stuff brainstorm.
If your JavaScript form has start chapter on variables, 2d on functions, and third on arrays, then guess what, 90% of students won't even make till quaternary chapter.
I am on my journey to change this. I am writing tutorials that teach you to build things first, and larn the theory after. This way you don't lose your involvement and proceed learning.
Practise subscribe at supersarkar.com for new tutorials every calendar week.
Keep Rocking \m/
Source: https://medium.com/frontendshortcut/why-javascript-should-be-your-first-programming-language-cdf1d7108f86
Post a Comment for "Do You Need Go Know Css for Javascript"