Untitled

 avatar
user_7147158
plain_text
5 months ago
1.7 kB
6
Indexable
// var a = 10;
// function abcd(){
//     if(true){
//         console.log(a);
//         var a = 5;
//     }
// }
// abcd()

// let a = 10;
// let b = a++;
// console.log(a, b);
// console.log(1 + "2" + "3");
// console.log("5"+5 - "2");
// console.log("5"+5 - 2);
// console.log(5 -2 + "5");

// const arr = [1, 2, 3];
// arr[10] = 5;
// console.log(arr)
// console.log(arr.length);

// let x = "5";
// console.log(x + 5);
// console.log(+x + 5)


// let a = [1, 2, 3];
// let b = a;
// b.push(4);
// console.log(a);


// const x = 5;
// if (x === "5") {
//     console.log("Equal");
// } else {
//     console.log("Not equal");
// }


// let x = [1, 2, 3];
// x = [4, 5, 6];
// let y = x;
// console.log(y);


// let a = true + false + true;
// console.log(a);
// type coersion
// run time par operator type change kar deta hain

// console.log([] == []);


// let a = [1, 2, 3];
// a.length = 0;
// console.log(a);


// let a = "10";
// let b = 10;
// console.log(a == b);
// console.log(a === b);

// let a = 5;
// let b = (a++) + (++a);
// console.log(a++);
// console.log(++a)

// const x = 1 + "2" + 3;
// const y = "2" - 1;
// console.log(x, y);


// const a = [1, 2, 3];
// const b = [...a];
// spread operator
// const b = a;
// console.log(a == b)
// a[0] = 5;
// console.log(b);


// let arr = [1, 2, 3];
// arr[100] = 5;
// console.log(arr.length);

// const arr = [];
// arr[0] = 1;
// arr[1000] = 1000
// console.log(arr.length)

// let a = 5;
// let b = 10;
// [a, b] = [b, a];
// console.log(a, b);


// console.log(+"5" === 5);
// console.log(+true === 1);
// console.log(+"Hello");




Editor is loading...
Leave a Comment