Thanks for reading, Getting started with JavaScript!
If you haven't read it before please click here!
Requirements[/u]]
Read "Getting started with JavaScript".
Selected & Installed your preferred IDE.
Understand that JS means JavaScript.
Read "Getting started with JavaScript".
Selected & Installed your preferred IDE.
Understand that JS means JavaScript.
Starting off with coding in JavaScript![/u]]
When coding in JavaScript, we must "always" put in this "basic" script. It's called the script tag, I like to call it the "JSDetector" which stands for "JavaScript Detector". "Most" of the time, if you were coding in JS, this is where it will be.
Here it is:
When coding in JavaScript, we must "always" put in this "basic" script. It's called the script tag, I like to call it the "JSDetector" which stands for "JavaScript Detector". "Most" of the time, if you were coding in JS, this is where it will be.
Here it is:
Code:
<script type="text/javascript">
</script>
Your first basic code![/u]]
We will be outputting text. Alright, what do we put first? You guessed it!
Your "JSDetector" will be inserted like this:
We will now type in "between these 2 codes, "document.write();".
This just tells JS to output the text in the parenthesis.
When typing numbers, you just put it in the parenthesis such as "document.write(777);".
When typing letters they must be put in qutations such as "document.write("Hey!");"
When we finally finish the code, it will look like this.
Numbers:
Letters:
That is your "basic" output text!
We will be outputting text. Alright, what do we put first? You guessed it!
Your "JSDetector" will be inserted like this:
Code:
<script type="text/javascript">
</script>
This just tells JS to output the text in the parenthesis.
When typing numbers, you just put it in the parenthesis such as "document.write(777);".
When typing letters they must be put in qutations such as "document.write("Hey!");"
When we finally finish the code, it will look like this.
Numbers:
Code:
<script type="text/javascript">
document.write(777);
</script>
Code:
<script type="text/javascript">
document.write("Hey!");
</script>