DEV Community

Cover image for JavaScript Challange 100 day with Mukhriddin (Part 1)
Mukhriddin Khodiev (work)
Mukhriddin Khodiev (work)

Posted on

JavaScript Challange 100 day with Mukhriddin (Part 1)

Assalamualaikum warahmatullahi wabarakatuh!

Bismillah, today we started a 100 day javascript challenge. Daily challenge questions will be posted on our Telegram page and we will constantly share the solutions on the dev.to platform! Barakallahu feekum!

#CHALLANGE1

// What is the value of "n" ?

let x = 100;
let y = x++;
let z = ++x;
let n = (x==y) ? z++ : ++z;

console.log(n); // 103

Enter fullscreen mode Exit fullscreen mode

#CHALLANGE2


// What is the output?

const f=new Boolean(false);

if (f){
   console.log(1);
}else{
   console.log(2);
}


console.log(typeof f); 


// output :  1 , object

Enter fullscreen mode Exit fullscreen mode

#CHALLANGE3

// What is the output?

const obj = { x: 1, y: 2 };
let {x: a, y: b} = obj;
a=2;

console.log(obj.x, obj. y);  

// output:  1 , 2

Enter fullscreen mode Exit fullscreen mode

#CHALLANGE4

// What is the output?

let elf="Mystery";
function lapland(params) {
  console.log(elf);
  let elf="Serius";
}

lapland(); 

// output:  ReferenceError: Cannot access 'elf' before initialization

Enter fullscreen mode Exit fullscreen mode

#CHALLANGE5

// What is the output?

const obj = {};
obj.value = undefined;
console.log(Object.hasOwn(obj, 'value'));

// output: true

Enter fullscreen mode Exit fullscreen mode


javascript

#CHALLANGE6

// What is the output?

let foo=function(){
    console.log(1);
};

setTimeout (foo, 1000);

foo=function(){
    console.log(2);
};

// output: 1

Enter fullscreen mode Exit fullscreen mode

Image description

#CHALLANGE7

// What is the output?

console.log("7" > "17");
console.log("07" > "17");

// output: true , false

Enter fullscreen mode Exit fullscreen mode

#CHALLANGE8

// What is the output?

console.log(1 + 2 + '1');
console.log('1' + 1 + 2);

// output: 31 , 112

Enter fullscreen mode Exit fullscreen mode

#CHALLANGE9

// What is the output?

var bar =function foo(){};

   console.log(bar===foo) ;

// output: ReferenceError: foo is not defined

Enter fullscreen mode Exit fullscreen mode

#CHALLANGE10

// What is the output?

let obj ={
    timeoutId:setTimeout(()=>{
      console.log('Hey');
    } , 3100)
}

delete obj.timeoutId;

obj = null;

// output: Hey

Enter fullscreen mode Exit fullscreen mode

Our challenge will continue, 10 questions will be posted in each part on our telegram channel, inshaaAllah we hope it will be useful!
Barakallahu feekum!

You can follow and share us on networks!

πŸ”— https://t.me/mukhriddinweb
πŸ”— https://medium.com/@mukhriddinweb
πŸ”— https://dev.to/mukhriddinweb
πŸ”— https://khodieff.uz
πŸ”— https://github.com/mukhriddin-dev
πŸ”— https://linkedin.com/in/mukhriddin-khodiev
πŸ”— https://youtube.com/@mukhriddinweb

Top comments (0)