The basic concepts of programming are pretty easy. Syntax is likely going to be the trickiest part to get down at first.
Basic programming is as follows.
Variables can store values. For example,
x = 5
name = "cotton"
The left hand side of the “=” is the variable name. The right side of the “=” is some value. Furthermore, the value on the right is a “type” of data. For example, “cotton” is a string datatype.
Other datatypes include: Dictionary (aka Associative Array/Map), Array, String, Integer, etc.
Another basic concept are “control flow constructs” that direct the flow of the program. One of these are “if” statements.
if ( name == "cotton" )
One of the datatypes is an array. Below is an example of an array of strings:
We can print values from our array like this (in pseudo code):
That would print “cat”
That would print “dog”
The only tricky part of arrays are that, typically, they are “zero indexed” meaing the first index, or value, is “0” and not “1”.
This brings me to my final point, which is looping. It’s a control flow construct. You can use a “for” loop to iterate over an array to do something to each index(value).
For example in python-like pseudo code and using the array from above:
for thing in arrayX:
That would print:
To summarize - the basics of concepts of programming might be awkward at first, but once you learn them them - typically, the apply all programming languages. The names might be different, ie one language may call something a hashmap, and another might call it a dictionary, but they are the same thing.
Therefore, take some time to get familiar with variables, datatypes, conditional statments (if statements), and loops. Once you have that down you’ll be in really good shape.