mNo edit summary |
mNo edit summary |
||
Line 5: | Line 5: | ||
Let's get right down to it: All you need to learn are ''five core concepts''. The language doesn't matter. At a high level, they're all the same. Half of them look like C, but that's not to say the grade or even the speed. C, being among the beefiest of letters, is also a ''language''. Let's follow in the footsteps of everyone else and write our code to be like C. | Let's get right down to it: All you need to learn are ''five core concepts''. The language doesn't matter. At a high level, they're all the same. Half of them look like C, but that's not to say the grade or even the speed. C, being among the beefiest of letters, is also a ''language''. Let's follow in the footsteps of everyone else and write our code to be like C. | ||
=== Variables === | === Variables === | ||
Variables are how you store ''all'' the things. They can take many forms, such as text | Variables are how you store ''all'' the things. They can take many forms, such as text, various kinds of numbers and booleans. It should be noted that boolean is an ''actual word'', and a boolean can have only two values: '''true''' or '''false'''. Creating variables might look like this: | ||
<nowiki>var userName = "Ada Lovelace" | <nowiki>var userName = "Ada Lovelace" | ||
var userAge = 209 | var userAge = 209 |
Revision as of 18:39, 5 December 2024
Code
Code consists of instructions written in alien machine languages. Contrary to popular belief, they are much easier to read and write than human languages. In fact, you are going to learn how to code right now!
How to code
Let's get right down to it: All you need to learn are five core concepts. The language doesn't matter. At a high level, they're all the same. Half of them look like C, but that's not to say the grade or even the speed. C, being among the beefiest of letters, is also a language. Let's follow in the footsteps of everyone else and write our code to be like C.
Variables
Variables are how you store all the things. They can take many forms, such as text, various kinds of numbers and booleans. It should be noted that boolean is an actual word, and a boolean can have only two values: true or false. Creating variables might look like this:
var userName = "Ada Lovelace" var userAge = 209 var isAlive = false
Functions
Conditionals
Don't let the obnoxious word frighten you. The original authors dislike it too, and have long since shown their disdain by replacing it with the much shorter if.
Loops
Classes
Examples
What now?
Now you pick your first language. Much like buying your first car, this will depend on your needs and desires, but should prove to be much cheaper.
Due to the above comparison, we will not be advising you to "break a leg," but will instead wish you Godspeed.