Skip to content

Commit 7b10d64

Browse files
committed
day 9 of learing dsa
1 parent cbf3bf6 commit 7b10d64

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

Array/day8.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// ! DSA in JavaScript day 5
1+
// ! DSA in JavaScript day 8
22

33
// Todo: Topic Array
44

day9.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// ! DSA in JavaScript day 9
2+
3+
// Todo: Topic Array
4+
5+
function CamelCase(string) {
6+
const name =
7+
string.charAt(0).toUpperCase() + string.slice(1).toLocaleLowerCase();
8+
return name;
9+
}
10+
11+
console.log(CamelCase("bhavishya tripathi"));
12+
13+
console.clear();
14+
15+
function fizzBuzz(n) {
16+
for (let i = 1; i <= n; i++) {
17+
if (i % 3 === 0 && i % 5 === 0) {
18+
console.log("fizzBuzz");
19+
} else if (i % 3 === 0) {
20+
console.log("fizz");
21+
} else if (i % 5 === 0) {
22+
console.log("Buzz");
23+
} else {
24+
console.log(i);
25+
}
26+
}
27+
}
28+
29+
fizzBuzz(15);

tempCodeRunnerFile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
const name =

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy