Post: Java Script lesson 1 variables
09-13-2015, 11:02 PM #1
Teenage Modz
Do a barrel roll!
(adsbygoogle = window.adsbygoogle || []).push({}); Today i will be starting a tutorial on java script, every day i will come and update this thread for you guys. If you already know java script then this isn't the place for you. I will start advanced tutorials after i get the basics done. This is for beginners who would like to learn java script.

The syntax and how to set it up

To learn variables all we simply need to do is cut of iables, that's right! its pretty simple.
the decloration or the name is our name for the variable.

Exp:
    var (ourName)


the = is what links the name to the data type

EXP:
    var myAge = 16;


Variables are used for storing data values,(we will learn more about data types tomorrow)now let me give some more information about variables and if you want then feel free to post your own variable.


Strings and numbers
strings aka text goes in "" (if you add numbers in "" it will be counted as text)
always ALWAYS! put the ; just please don't forget it, its very important that you always put it at the end.
numbers don't have to have quotes.


Other INFO
Here are some more examples if you aren't understanding it to the full extent

EXP:
     var myName = "aaron";
var animal = "Lion";
var favoriteNumber = 8;
var number = 6;


If you still don't understand feel free to ask questions, Happy programming!
Last edited by Teenage Modz ; 09-14-2015 at 06:24 AM.

The following user thanked Teenage Modz for this useful post:

09-14-2015, 02:35 AM #2
Default Avatar
Morphus
Guest
Originally posted by Another View Post
Today i will be starting a tutorial on java script, every day i will come and update this thread for you guys. If you already know java script then this isn't the place for you. I will start advanced tutorials after i get the basics done. This is for beginners who would like to learn java script.

To learn variables all we simply need to do is cut of iables, that's right! its pretty simple.
the decloration or the name is our name for the variable.
Exp: var (ourName)

the = is what links the name to the data type

EXP: var myAge = 16;

Variables are used for storing data values,(we will learn more about data types tomorrow)now let me give some more information about variables and if you want then feel free to post your own variable.

strings aka text goes in "" (if you add numbers in "" it will be counted as text)
always ALWAYS! put the ; just please don't forget it, its very important that you always put it at the end.

numbers don't have to have quotes.
Here are some more examples if you aren't understanding it to the full extent
EXP: var myName = "aaron";
var animal = "Lion";
var favoriteNumber = 8;
var number = 6;

If you still don't understand feel free to ask questions, Happy programming!


It's nice to see people actually providing teachings rather than just giving people code to copy and paste, As for the thread layout I would just update the layout of it because it looks daunting with the it all looking like one big block of text.

Try adding titles to each bit and placing the code in "
    " tags[/B]
09-14-2015, 07:58 AM #3
Mango_Knife
In my man cave
Originally posted by Another View Post
Today i will be starting a tutorial on java script, every day i will come and update this thread for you guys. If you already know java script then this isn't the place for you. I will start advanced tutorials after i get the basics done. This is for beginners who would like to learn java script.

The syntax and how to set it up

To learn variables all we simply need to do is cut of iables, that's right! its pretty simple.
the decloration or the name is our name for the variable.

Exp:
    var (ourName)


the = is what links the name to the data type

EXP:
    var myAge = 16;


Variables are used for storing data values,(we will learn more about data types tomorrow)now let me give some more information about variables and if you want then feel free to post your own variable.


Strings and numbers
strings aka text goes in "" (if you add numbers in "" it will be counted as text)
always ALWAYS! put the ; just please don't forget it, its very important that you always put it at the end.
numbers don't have to have quotes.


Other INFO
Here are some more examples if you aren't understanding it to the full extent

EXP:
     var myName = "aaron";
var animal = "Lion";
var favoriteNumber = 8;
var number = 6;


If you still don't understand feel free to ask questions, Happy programming!


No offence bro, but it's a bit useless
People can just look on youtube for JavaScript tutorials, There are many..

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo