اجرا نکرده جواب بدید : خروجی چی میشه؟
#interview #js
async function run() {
console.log('1');
await Promise.resolve();
console.log('2');
}
run();
console.log('3');
#interview #js
اجرا نکرده جواب بدید : خروجی چی میشه؟
#interview #js
let a = { x: 1 };
let b = a;
a.x = 2;
a = { x: 3 };
console.log(b.x);
#interview #js
سوالات مصاحبهای پارت ۱
Q1:
3
3
3
Q2:
0
1
2
Q3:
Hi undefined
Q4:
""
[object Object]
[object Object]
NaN
Q5:
1undefined
Q6:
true
Q7:
false
Q8:
0
2
Q9:
true
false
Q10:
456
Q11:
undefined
Q12:
'51'
4
Q13:
2 1
Q14:
'1,2,34,5,6'
Q15:
ReferenceError: Cannot access 'y' before initialization
Q16:
1
5
3
4
2
Q17:
5
Q18:
A
C
B
Q19:
Ali the code guy
Reza the pilot
Q20:
undefinedthe code guy
Reza the pilot
Q21:
Uncaught ReferenceError: Cannot access 'name' before initialization
Q22:
console.log(a); // ✅ prints: a
console.log(b); // ❌ ReferenceError: b is not defined
console.log(c); // ❌ ReferenceError: c is not defined
console.log(d); // ❌ ReferenceError: d is not defined
console.log(e); // ❌ ReferenceError: e is not defined
console.log(f); // ❌ ReferenceError: f is not defined
Q23:
a
TypeError: b is not a function
Q24:
[5, 5, 5, 5, 5]
Q25:
4
5
6
Q26:
undefined
Q27:
End
Microtask - Promise
Macrotask - Timer
پارت ۲ سوالات:
https://news.1rj.ru/str/danceswithcode/4618
@danceswithcode
#interview #js
Q1:
for (var i = 0; i < 3; i++) {
setTimeout(() => console.log(i), 1000);
}
3
3
3
Q2:
for (let i = 0; i < 3; i++) {
setTimeout(() => console.log(i), 1000);
}
0
1
2
Q3:
const obj = {
name: 'Ali',
sayHi: function () {
setTimeout(function () {
console.log(`Hi ${this.name}`);
}, 1000);
}
};
obj.sayHi();
Hi undefined
Q4:
console.log([] + []);
console.log([] + {});
console.log({} + []);
console.log({} + {});
""
[object Object]
[object Object]
NaN
Q5:
let x = 1;
if (function f() {}) {
x += typeof f;
}
console.log(x);
1undefined
Q6:
console.log([] == ![]);
true
Q7:
console.log([] == []);
false
Q8:
let x = 0;
console.log(x++);
console.log(++x);
0
2
Q9:
console.log(1 < 2 < 3);
console.log(3 > 2 > 1);
true
false
Q10:
const a = {};
const b = { key: 'b' };
const c = { key: 'c' };
a[b] = 123;
a[c] = 456;
console.log(a[b]);
456
Q11:
let obj = {
a: 10,
b: () => console.log(this.a)
};
obj.b();
undefined
Q12:
console.log("5" + 1);
console.log("5" - 1);
'51'
4
Q13:
let a = 1;
let b = a++;
console.log(a, b);
2 1
Q14:
console.log([1, 2, 3] + [4, 5, 6]);
'1,2,34,5,6'
Q15:
function test(x = y, y = 2) {
console.log(x, y);
}
test();
ReferenceError: Cannot access 'y' before initialization
Q16:
console.log('1');
setTimeout(() => console.log('2'), 0);
Promise.resolve().then(() => console.log('3')).then(() => console.log('4'));
console.log('5');
1
5
3
4
2
Q17:
async function test() {
return 5;
}
test().then(console.log);
5
Q18:
Promise.resolve()
.then(() => console.log('A'))
.then(() => console.log('B'));
Promise.resolve().then(() => console.log('C'));
A
C
B
Q19:
var name = "Ali";
(function () {
console.log(name + " the code guy");
name = "Reza";
console.log(name + " the pilot");
})();
Ali the code guy
Reza the pilot
Q20:
var name = "Ali";
(function () {
console.log(name + " the code guy");
var name = "Reza";
console.log(name + " the pilot");
})();
undefinedthe code guy
Reza the pilot
Q21:
var name = "Ali";
(function () {
console.log(name + " the code guy");
let name = "Reza";
console.log(name + " the pilot");
})();
Uncaught ReferenceError: Cannot access 'name' before initialization
Q22:
if (2 == '2') {
var a = 'a';
let b = 'b';
const c = 'c';
}
function func() {
var d = 'd';
let e = 'e';
const f = 'f';
}
func();
console.log(a);
console.log(b);
console.log(c);
console.log(d);
console.log(e);
console.log(f);
console.log(a); // ✅ prints: a
console.log(b); // ❌ ReferenceError: b is not defined
console.log(c); // ❌ ReferenceError: c is not defined
console.log(d); // ❌ ReferenceError: d is not defined
console.log(e); // ❌ ReferenceError: e is not defined
console.log(f); // ❌ ReferenceError: f is not defined
Q23:
a()
b()
c()
function a () {
console.log('a')
}
const b = () => {
console.log('b')
}
var c = function() {
console.log('c')
}
a
TypeError: b is not a function
Q24:
const funcs = [];
for (var i = 0; i < 5; i++) {
funcs.push(() => i);
}
console.log(funcs.map(f => f()));
[5, 5, 5, 5, 5]
Q25:
Promise.resolve().then(() => console.log(1));
queueMicrotask(() => console.log(2));
setTimeout(() => console.log(3), 0);
console.log(4);
new Promise(() => console.log(5));
(async () => console.log(6))();
4
5
6
Q26:
async function foo() {
setTimeout(() => {
return 'done';
}, 1000);
}
foo().then(res => console.log(res));
undefined
Q27:
setTimeout(() => {
console.log('Macrotask - Timer');
}, 0);
Promise.resolve().then(() => {
console.log('Microtask - Promise');
});
console.log('End');
End
Microtask - Promise
Macrotask - Timer
پارت ۲ سوالات:
https://news.1rj.ru/str/danceswithcode/4618
@danceswithcode
#interview #js
پلیلیست ویدیوهای ۳۶۰ آپدیت شد:
https://www.youtube.com/playlist?list=PLkWiyaZVy9w42RP5296F_ifBJz61MuVfI
https://www.youtube.com/playlist?list=PLkWiyaZVy9w42RP5296F_ifBJz61MuVfI
دوباره افتادم توی مصاحبه و حدود ۹۰ درصد سوالاتی که میپرسن الگوریتمه.
تقویتش کنید دوستای گلم.
تقویتش کنید دوستای گلم.
رقصنده با کد
دوباره افتادم توی مصاحبه و حدود ۹۰ درصد سوالاتی که میپرسن الگوریتمه. تقویتش کنید دوستای گلم.
آقا در کنار الگوریتم ، تایپ اسکریپتتون رو هم تقویت کنید.
برای بعضیجاها خیلی مهمه که دانش تایپ اسکریپتون سطحی نباشه و واقعا عمیق بلد باشید.
برای بعضیجاها خیلی مهمه که دانش تایپ اسکریپتون سطحی نباشه و واقعا عمیق بلد باشید.
پیشنهاد میکنم این پست رو ببینید که توش شرکتهایی رو معرفی کرده که همین الان نیروی ریموت میخوان. احتمال اینکه از داخل ایران بتونید کار بگیرید خیلی کمه ولی برید ببینید و مقایسه کنید ببینید دانش فنیتون نسبت به نیاز بازار در چه وضعیه.
https://www.linkedin.com/posts/jordanmazer_these-24-companies-are-all-remote-and-theyre-activity-7335672504654409730-8p9w?utm_source=share&utm_medium=member_android&rcm=ACoAACtcWEYBTrZMU9DqRUSmbHsrw5UuZpcD8m0
https://www.linkedin.com/posts/jordanmazer_these-24-companies-are-all-remote-and-theyre-activity-7335672504654409730-8p9w?utm_source=share&utm_medium=member_android&rcm=ACoAACtcWEYBTrZMU9DqRUSmbHsrw5UuZpcD8m0
پیشنهاد
این ویدیوی تایپ اسکریپت رو از اول تا آخر با سرعت ۱.۵ بدون استاپ و بدون تمرین ببینید:
https://www.youtube.com/watch?v=30LWjhZzg50&t=2117s
این ویدیوی تایپ اسکریپت رو از اول تا آخر با سرعت ۱.۵ بدون استاپ و بدون تمرین ببینید:
https://www.youtube.com/watch?v=30LWjhZzg50&t=2117s
دورههایی که شروع میکنید به یادگیری (چه مجازی ، چه حضوری ، چه ویدیویی) ، آیا به پایان میرسونید؟
Final Results
45%
بله
55%
خیر
پیشنهاد:
توی لینکدین فقط نفراتی که تخصصهای مد نظر شما رو دارن توی کانشکشنهاتون داشته باشید و حتی اگر اونها هم هر چیزی (تکرار میکنم هر چیزی) به جز مطلب تخصصی گذاشتن یا لایک کردن یا کامنت گذاشتن، آنفالو و ریممو کانکشن و بلاک کنید.
تاثیرش رو سر یک سال کامل متوجه میشید.
توی لینکدین فقط نفراتی که تخصصهای مد نظر شما رو دارن توی کانشکشنهاتون داشته باشید و حتی اگر اونها هم هر چیزی (تکرار میکنم هر چیزی) به جز مطلب تخصصی گذاشتن یا لایک کردن یا کامنت گذاشتن، آنفالو و ریممو کانکشن و بلاک کنید.
تاثیرش رو سر یک سال کامل متوجه میشید.
یه بازی موبایلی معرفی کنم روح و روانتون رو بهم بریزه:
NOTNOT
NOTNOT
رقصنده با کد
سوالات مصاحبهای پارت ۱ Q1: for (var i = 0; i < 3; i++) { setTimeout(() => console.log(i), 1000); } 3 3 3 Q2: for (let i = 0; i < 3; i++) { setTimeout(() => console.log(i), 1000); } 0 1 2 Q3: const obj = { name: 'Ali', sayHi: function () {…
این سوال و جوابها رو گم نکنید. به راحتی حداقل ۳۰ درصد مصاحبتون رو پوشش میده.
خب خوشبختانه من دیشب رسیدم تهران و متاسفانه امشب اسراییل حمله کرد.
نظر خاصی در مورد جنگ ندارم ، ماشالله همه بهتر از من سردرمیارن ولی خب رشد و یادگیریتون رو متوقف نکنید. ایران همیشه همین بوده
نظر خاصی در مورد جنگ ندارم ، ماشالله همه بهتر از من سردرمیارن ولی خب رشد و یادگیریتون رو متوقف نکنید. ایران همیشه همین بوده