Skip to content

Commit e1938d0

Browse files
committed
homework ykaraca
1 parent af548f9 commit e1938d0

10 files changed

Lines changed: 82 additions & 0 deletions

File tree

‎Week1/homework/ex10Compare.js‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict'
2+
var myArray1=[34,44,"malatya","Mechanicsburg"];
3+
var myArray2=[49,35,"mus",99,"newyork","atina",7];
4+
console.log('The length of the array1 is...' +myArray1.length);
5+
console.log('The length of the array2 is...' +myArray2.length);
6+
if (myArray1.length==myArray2.length){
7+
console.log("They are the same!");
8+
}
9+
else{console.log("Two different sizes")}

‎Week1/homework/ex1logHello.js‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
'use strict'
2+
console.log("Halo, dunia!");
3+
console.log("Ciao, mondo!");
4+
console.log("Hola, mundo!");
5+
console.log("Hello, World");
6+
console.log("Merhaba, Dunya");
7+
console.log("Γειά σου Κόσμε");
8+
console.log("مرحبا بالعالم");
9+
console.log("你好,世界");
10+
console.log("Hallo Wereld");
11+
console.log("Ciao mondo");

‎Week1/homework/ex2Syntax.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
'use strict'
2+
console.log('I\'m awesome');

‎Week1/homework/ex3Log.js‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'use strict'
2+
var numberX;
3+
console.log("what you think the value of x");
4+
console.log("the value of x is "+numberX);
5+
numberX=9;
6+
console.log("what you think the value of x");
7+
console.log("the value of x is "+numberX);

‎Week1/homework/ex4LogString.js‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict'
2+
var myString="Yusuf karaca";
3+
console.log("what you think the value of string is");
4+
console.log(myString);
5+
myString="Memleket Malatya";
6+
console.log("what you think the value of string is");
7+
console.log(myString);
8+
9+

‎Week1/homework/ex5Round.js‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'use strict'
2+
var z=7.25;
3+
console.log("z : "+z);
4+
var a=7;
5+
console.log("a : "+a);
6+
var m=Math.max(a,z);
7+
console.log("the highest is :"+m);

‎Week1/homework/ex6LogArray.js‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
'use strict'
2+
var items=[];
3+
console.log("what you think the value of the array is ?");
4+
console.log(items);
5+
var animals=["cat","bird","turtle"];
6+
console.log(animals);
7+
animals.push("piglet");
8+
console.log(animals);

‎Week1/homework/ex7LogLeng.js‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
'use strict'
2+
var mySentence="Programming is so interesting!";
3+
var myLength=mySentence.length;
4+
console.log(myLength);

‎Week1/homework/ex8TypeC.js‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
'use strict'
2+
var myString1="Same";
3+
var myString2="Same";
4+
var myNumber1=44;
5+
var myNumber2=40;
6+
console.log(typeof myString1);
7+
console.log(typeof myString2);
8+
if (typeof myString1==typeof myString2){
9+
console.log("SAME TYPE");
10+
}
11+
else{console.log("Not the same...");}
12+
13+
console.log(typeof myString1);
14+
console.log(typeof myNumber1);
15+
if (typeof myString1==typeof myNumber1){
16+
console.log("SAME TYPE");
17+
}
18+
else{console.log("Not the same...");}

‎Week1/homework/ex9LogRemain.js‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'use strict'
2+
// 7/3=2 and remain is 1 so x= 1,
3+
console.log(7%3);
4+
// 21/4=5 and remain is 1 so y=1,
5+
console.log(21%4);
6+
// 13/2=6 and remain 1 so z = 1,
7+
console.log(13%2);

0 commit comments

Comments
 (0)