Skip to content

Commit 096eb3a

Browse files
committed
added dataTypes.js
1 parent df3bc1b commit 096eb3a

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

0.01_datatypes.js

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// data types
2+
3+
//Strings
4+
//Strings are a collection of characters
5+
6+
// console.log("What a Wonderful world.");
7+
// console.log('Hello you guys');
8+
// console.log("it's a wonderful day");
9+
// console.log('Thomas said "I think grass is green"'.toUpperCase());
10+
// console.log('Couldn\'t things get any better'.length); // "\" escapes a string
11+
12+
// Challenge: create a string that has your name and use the to lower case function to make sure each character is lower case
13+
var myName = "Aaron Ofengender"
14+
console.log(myName);
15+
console.log(myName.toLowerCase());
16+
17+
// 012345678910
18+
console.log("jay jackson"[0].toUpperCase());
19+
console.log("jay"[0].toUpperCase() + "jay"[1] + "jay"[2])//string concatenation
20+
21+
//Challenge: uppercase the m in Home and put the string back together using string concatenation
22+
var word = "Home";
23+
console.log(word);
24+
console.log(word[0] + word[1] + word[2].toUpperCase()+ word[3]);
25+
26+
console.log(typeof("ufbreuifrn"));
27+
28+
//Numbers (aka Integers)
29+
console.log(typeof(484));
30+
console.log(2+5);
31+
console.log(2-5);
32+
console.log(2*5);
33+
console.log(2/5);
34+
console.log(2%5);
35+
36+
//Booleans (true/false)
37+
console.log(true);
38+
/*
39+
Conditional operators: <, >, <=, >=, ==, ===, !, !=, !==, ||, &&
40+
*/
41+
console.log(4 == 5);
42+
console.log("Test".length > "ego".length);
43+
console.log(1 == "1");
44+
console.log(1 === "1");

0 commit comments

Comments
 (0)