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
#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
#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
#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
#CHALLANGE5
// What is the output?
const obj = {};
obj.value = undefined;
console.log(Object.hasOwn(obj, 'value'));
// output: true
javascript
#CHALLANGE6
// What is the output?
let foo=function(){
console.log(1);
};
setTimeout (foo, 1000);
foo=function(){
console.log(2);
};
// output: 1
#CHALLANGE7
// What is the output?
console.log("7" > "17");
console.log("07" > "17");
// output: true , false
#CHALLANGE8
// What is the output?
console.log(1 + 2 + '1');
console.log('1' + 1 + 2);
// output: 31 , 112
#CHALLANGE9
// What is the output?
var bar =function foo(){};
console.log(bar===foo) ;
// output: ReferenceError: foo is not defined
#CHALLANGE10
// What is the output?
let obj ={
timeoutId:setTimeout(()=>{
console.log('Hey');
} , 3100)
}
delete obj.timeoutId;
obj = null;
// output: Hey
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)