Skip to content

Commit 2b9a013

Browse files
add: updating comment
1 parent 204e546 commit 2b9a013

File tree

2 files changed

+31
-20
lines changed

2 files changed

+31
-20
lines changed

JavaScript Part-01/01file.js

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
1-
// printing hello world in console
1+
// IDEA: printing hello world in console
22

3-
// console.log() can print something on console
3+
// NOTE: 'filter method' will filter out value according to the give condition
4+
5+
// BUG: 1. JavaScript is a Oops language
6+
// TODO:
7+
// FIXME:
8+
// BUG: Variables
9+
// TODO: console.log() can print something on console
410

511
console.log("Hello World");
612
console.log("Hello, World");
713

8-
// Single Line Comment: It is represented by // (double forward slash)
9-
// Multi-Line Comment: Slash represents it with asterisk symbol as /* write comment here */
14+
// NOTE: Single Line Comment: It is represented by // (double forward slash)
15+
// NOTE: Multi-Line Comment: Slash represents it with asterisk symbol as /* write comment here */
1016

11-
// String Important Interview Question?
17+
// HACK: String Important Interview Question?
1218

13-
// 1) What is the output of 10+20+"30" in JavaScript?
14-
// => 3030 because 10+20 will be 30. If there is numeric value before
19+
// INFO: 1) What is the output of 10+20+"30" in JavaScript?
20+
// => 3030 because 10+20 will be 30. If there is numeric value before
1521
// and after +, it treats as binary + (arithmetic operator).
1622

17-
// 2) What is the output of "10"+20+30 in JavaScript?
18-
// => 102030 because after a string all the + will be treated as
19-
// string concatenation operator (not binary +).
23+
// INFO:2) What is the output of "10"+20+30 in JavaScript?
24+
// => 102030 because after a string all the + will be treated as
25+
// string concatenation operator (not binary +).
Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
1-
// filter Method
2-
// 'filter method' will filter out value according to the give condition
1+
// IDEA: filter Method
2+
// NOTE: 'filter method' will filter out value according to the give condition
33

4+
// BUG: 1. JavaScript is a Oops language
5+
// TODO: 2.
6+
// FIXME: 3.
7+
// BUG: 4. Variables
8+
// HACK: 5.
9+
// INFO: 6.
410

511
// these be use to filter out the both even and odd numbers.
612
// with the help of the filter function it stores only
713
// that number which is odd.
814

9-
const numbers = [1,3,2,6,4,8];
10-
const isOdd = function(number){
11-
return number%2!==0;
12-
}
15+
const numbers = [1, 3, 2, 6, 4, 8];
16+
const isOdd = function (number) {
17+
return number % 2 !== 0;
18+
};
1319
const oddNumber = numbers.filter(isOdd);
1420
console.log(oddNumber);
1521

16-
1722
// with the help of the filter function it stores only
1823
// that number which is even.
1924

2025
// simple above funtion using callback function & arrow function
21-
const evenNumbers = numbers.filter((number)=>{
22-
return number%2===0;
26+
const evenNumbers = numbers.filter((number) => {
27+
return number % 2 === 0;
2328
});
24-
console.log(evenNumbers);
29+
console.log(evenNumbers);

0 commit comments

Comments
 (0)