OP 25 October, 2023 - 09:07 PM
(This post was last modified: 25 October, 2023 - 09:09 PM by isosceles. Edited 2 times in total.)
Programming is just logic. The basis of programming is the if-else conditional arithmetic statement:
lets say these characters are programming conditions. a programming condition can be any form of data, a number, a string, a data set.
here I will define a simple program in Javascript that sets the number X which is initialized at 5, to either 6 or 7 based on the conditions.
let X = 5;
let Z = 6;
function y() {
X = 6; "set X to 6"
}
function w() {
X = 7; "set X to 7"
}
if ( X == 5 ) { "if X is equal to 5"
y(); "run function y"
}
if ( Z != 6 ) { "if Z is not equal to 6"
"do something"
} else { "otherwise, if Z is equal to 6"
w(); "run function w"
}
The only thing that changes between programming languages is their performance, platforms, and the syntax. Everything else is just the same old logic.
That means if you learn one programming language, you've essentially learned how to read / write all of them; you just have to adapt to new syntax, platforms, and performance.
Libraries are extensions to programming languages that have been adapted to use modularly. Libraries have come a long way and theres one out there for any use you could possibly need.
lets say these characters are programming conditions. a programming condition can be any form of data, a number, a string, a data set.
here I will define a simple program in Javascript that sets the number X which is initialized at 5, to either 6 or 7 based on the conditions.
let X = 5;
let Z = 6;
function y() {
X = 6; "set X to 6"
}
function w() {
X = 7; "set X to 7"
}
if ( X == 5 ) { "if X is equal to 5"
y(); "run function y"
}
if ( Z != 6 ) { "if Z is not equal to 6"
"do something"
} else { "otherwise, if Z is equal to 6"
w(); "run function w"
}
The only thing that changes between programming languages is their performance, platforms, and the syntax. Everything else is just the same old logic.
That means if you learn one programming language, you've essentially learned how to read / write all of them; you just have to adapt to new syntax, platforms, and performance.
Libraries are extensions to programming languages that have been adapted to use modularly. Libraries have come a long way and theres one out there for any use you could possibly need.