- Strings
- Integers
- Floats
- Boolean
- Array
- Extensions
- String is text. Example is "hello" or 'hello' (don't forget the quotations, please).
- Integer is a whole number (positive or negative). Example is 10, 0, or -25.
- Float is a number with decimals (positive or negative). Example is 5.5 or -0.001.
- Boolean is a true or false value/indicator. An example is a conditional statement such as if x >= 5.
- Array is a collection of values. Example is formated as such [26,24,27] or ["a","b","c"]. It's best to have one data type within an array for coding simplicity (meaning to be able to manage/work with the values in an array) although it is possible to have multiple data types.
- Extension is data where pairing or coupling information is important. An example is as follows { "9th grade": 110, "10th grade": 125, "11th grade": 66, "12th grade": 70}. It's important in this instance to pair the grade (9th with the room of 110. Another example is { "Mod 0": "Tim and David", "Mod 1": "Mike and Sal", "Mod 2": "Brittany and Robbie" }
var pizza = "the best food of all time"; //string example
var isHungry = true;
var number = 5; //integer example
// reassign number
console.log("number = "+number)
number = 4; //integer example
console.log("number reassigned to "+number)
var teachers = ['Ellen','Robert','David'] //array example
console.log(teachers)
var pizzaType = "Pepperoni pizza is"
var output = pizzaType + " " + pizza
console.log(output)
var number2 = 5 //integer example
number * number2
console.log(number+"*"+number2+"="+number * number2)
- Mod0 Session 1 Data Type Information LINK
- Markdown: Basic writing & formatting LINK
- Markdown: Cheatsheet LINK
- Document data type information
- At least two headings of different sizes
- At least one numbered list
- At least one bullet point list
- At least one bold word/phrase
- At least one italic word/phrase
- At least one code block
- At least one inline code block (greyed text)
- At least one image
- Bonus - hyperlink