-
Notifications
You must be signed in to change notification settings - Fork 0
/
Study notes.txt
40 lines (30 loc) · 1.2 KB
/
Study notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
var transportation='car'
var= variable
transportation= variable name
= is the operator
'car' is the variable
// variables are containers that store data
//camelCaseIsAWayForUsToReadTextWithNoSpaces
Variables
case sensative
can only start with letters, _ or $
use camalCasing - start lower case and first letter of each work is upper case
use _ to seperate words
Property of strings
Linght property - example: STRING.length will retrun the length of the String
Methods
toUpperCase()
all methods end in "()"
Example: greeting.toUpperCase();
In JavaScript, a primitive (primitive value, primitive data type) is data that is not an
object and has no methods. There are 7 primitive data types: string, number, bigint,
boolean, null, undefined, and symbol.
String - a data type used to represent text and are wrapped in single or double quotes
Escape Character = \
Will make code ignor the next Character
example: var sentence = "Mary said, \"I am going to bed.\"";
another example: var sentence = 'Mary said, "I\'m going to bed.";
typeof
This will tell you the type of object following the typeof command
MetaCharacter
example: \n = find new line.