Skip to content

Commit 6e90afb

Browse files
author
Jerish-J
committed
Exercise done
1 parent b4fd3bb commit 6e90afb

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

exercises/converthourstoseconds.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
// Write a function that takes a parameter (hours) and converts
77
// it to seconds
88

9-
function howManySeconds(hours) {
10-
// Your function should return an integer
11-
// of how many seconds are in the hour
9+
const howManySeconds = (hours) => {
10+
answer = hours * 60 * 60
11+
console.log(answer)
1212
}
1313

1414
//Topics: Variables,functions, Math
1515

16+
howManySeconds(2)

yourPlayground.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,13 @@ const multiply = (a, b) => a + b
103103

104104
const nums = [1, 2, 3, 4, 5]
105105

106-
const result = nums.reduce(multiply)
106+
// const result = nums.reduce(multiply)
107+
108+
// console.log(result)
109+
110+
const resultOne = nums.reduce((a, b) => a + b)
111+
112+
// console.log("This is second result", resultOne)
113+
114+
const ActorInfo = [{name: "johnny", networth: 1000000},{name: "sean", networth: 1000000}, {name: "paul", networth: 1000000}, ]
107115

108-
console.log(result)

0 commit comments

Comments
 (0)