-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathassignment1.js
More file actions
81 lines (69 loc) · 1.65 KB
/
assignment1.js
File metadata and controls
81 lines (69 loc) · 1.65 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// Pattern print in javascript in console
// let star = "";
// ******* STAR PATTERN: 1 *******/
// for(let i = 0; i < 10; i++) {
// for(let j = 10; j > i; j--) {
// star += " ";
// }
// for(let k = 0; k <= i; k++ ) {
// star += "*";
// }
// }
// console.log(star)
//******* STAR PATTERN: 2 *******/
// for(let i = 0 ; i < 10; i++) {
// for (let j = 0; j < i; j++) {
// star += " ";
// }
// for(let k = 10; k > i; k--) {
// star += "*";
// }
// star += "\n";
// }
// console.log(star)
//******* STAR PATTERN: 3 *******/
// for(let i = 0; i < 10; i++) {
// for(let k = 10; k > i; k--) {
// star += " ";
// }
// for(let j = 0; j <= i; j++) {
// star += "*";
// }
// for(let l = 0; l < i; l++) {
// star += "*";
// }
// star += "\n";
// }
// console.log(star);
//******* STAR PATTERN: 4 *******/
// for(let i = 0; i < 10; i++) {
// for(let j = 10; j > i; j--) {
// star += " ";
// }
// for(let k = 0; k <= i; k++) {
// star += "*";
// }
// for(let l = 0; l < i; l++) {
// star += "*";
// }
// star += "\n";
// }
// for(let w = 0; w < 10; w++) {
// for(let x = 0; x < w; x++) {
// star += " ";
// }
// for(let y = 10; y > w; y--) {
// star += "*";
// }
// for(let z = 10; z > w; z--) {
// star += "*";
// }
// star += "\n";
// }
// console.log(star);
// Return function is javascript
var multiply = multiplicationFunction(4, 18);
function multiplicationFunction(value1, value2) {
return value1 * value2;
}
console.log("Multiplication Value is ", multiply);