I go for Javascript, it is useful for making applets lol.....
Though I never tried C++
Uh... JavaScript is not a programming language.
It's a scripting language.
I've never even heard a .exe JavaScript compiler before.
Scripting languages are programming languages. It doesn't matter whether people write native code compilers for a scripting language or not, it's still a programming language.
ok, well let me ask you this, for making a... let's say game that runs on your own computer, would you use VBScript, a scripting language, or VB, a programming language.
#include<stdio.h>
main()
{
printf("Hello World");
}
print "Hello World"
The reason I don't recommend C or C++ is because the syntax is complicated, and requires a lot of tutorials before you fully understand the language.
For example, here is the Hello World program in C:
Code:#include<stdio.h> main() { printf("Hello World"); }
And here is the Hello World program in Python:
Code:print "Hello World"
With python, you don't have to learn a ton of new syntax before you can get started in the language. All you have to do is look up what you're trying to do, and chances are, someone's already done it.
That is actually a bad example.
1. First of all, the declaration of the standard input/output header happens only once. It is also quite easy to understand. The declaration of main is also very good for a learning programmer, because functions are very important. This way you learn to deal with it immediately.
2. And second, I would like to state that less syntax does not have to be an advantage. To me, it even seems a disadvantage. Because of the syntax, your code becomes more readable. Whether a statement is a constructor, a function call or a memberfunction is very clear in the C++ syntax.
3. And lastly, debugging seems easier to me in C++. If you accidently remove the whitespace between print and "Hello World" , I can' t imagine what will happen, although it is just a whitespace. In C++ you can add and remove whitespaces as you wish, to make your code more readable.
if condition then:
dostuff()
if condition2 then:
domorestuff()
if (Condition) {dostuff();if (Condition) {domorestuff();}}
<html><head></head><body>
<script type="text/javascript">
// JavaScript goes here
var x = 2 * 2;
alert(x);
document.write('This be a text');
</script>
</body></html>
You don't need the web.Javascript is definately user friendly and easy to learn, but it can't do programming like some of these languages can, like C++ and Python. Javascript can only be used on the web aswell.
Go with JavaScript. It's useful, and gives instant feedback.
- Open notepad
- Copy/paste below in the code tag
- Save as blah.html
- Open with browser
- Play with as necessary using resources at http://www.w3schools.com
Code:<html><head></head><body> <script type="text/javascript"> // JavaScript goes here var x = 2 * 2; alert(x); document.write('This be a text'); </script> </body></html>
Not a programming language, but as a 'complete beginner' that's all the same to you anyway.
I recommend Firebug ( for Firefox ) & JSlint to find errors.
var x = 2 * 2;
alert(x);
document.write('This be a text');