Skip to content

Commit 7840423

Browse files
committed
new function added
1 parent ebf38ab commit 7840423

File tree

1 file changed

+27
-9
lines changed

1 file changed

+27
-9
lines changed

yourPlayground.js

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,32 @@ function weather() //weather fu
187187
// }
188188

189189

190-
const no = ['1','2','3','4']
191-
sum=0
190+
// const no = ['1','2','3','4']
191+
// sum=0
192+
193+
// let result = []
194+
// for(const john of no) {
195+
// sum+=Number(john)
196+
// result.push(sum)
197+
// }
198+
199+
// console.log(sum)
200+
// console.log(result)
201+
202+
203+
204+
// const howManyLetters = (phrase) => //size of string function
205+
// {
206+
// for( i in phrase)
207+
// {
208+
// console.log(Number(i) +1)
209+
// result = Number(i) +1 //phrase.length
210+
// }
211+
// return {result : result}
212+
// }
213+
214+
// const phrase= prompt("Write your Phrase : ")
215+
// console.log(howManyLetters(phrase))
216+
192217

193-
let result = []
194-
for(const john of no) {
195-
sum+=Number(john)
196-
result.push(sum)
197-
}
198218

199-
console.log(sum)
200-
console.log(result)

0 commit comments

Comments
 (0)