htmlcss_channels | Unsorted

Telegram-канал htmlcss_channels - html and css آموزش

20931

ادمین : @Maryam3771 تعرفه تبلیغات: https://t.me/alloadv/822

Subscribe to a channel

html and css آموزش

39. When would you use for vs forEach()?
for Loop vs forEach() 
for - More control, Can use break/continue, Faster in heavy loops 

forEach() - Cleaner syntax, Cannot stop early, Better readability

for Example

for (let i = 0; i < 3; i++) {
    console.log(i);
}


forEach() Example

[1, 2, 3].forEach(num => {
    console.log(num);
});


Interview Tip: 
Use forEach() for readability and for when more control is needed.

40. How do you handle early exits from loops?
Using break

for (let i = 1; i <= 5; i++) {
    if (i === 3) {
        break;
    }
    console.log(i);
}


Using return Inside Functions

function test() {
    for (let i = 1; i <= 5; i++) {
        if (i === 3) {
            return;
        }
        console.log(i);
    }
}

test();


Important:
forEach() does not support break directly.

Use:
• for
• for...of
• some()
• every()

for early exits.

Double Tap ❤️ For Part-5




💎 @Htmlcss_channels | #css #JavaScript #HTML #interview

Читать полностью…

html and css آموزش

📣 ثبت‌نام «بوت‌کمپ هوش مصنوعی مولد (GenAI)» آکادمی همراه اول آغاز شد!

🧠 امروز کسب‌وکارها و سازمان‌ها به متخصصانی نیاز دارند که بتوانند با بهره‌گیری از هوش مصنوعی مولد، داده‌های تصویری را تحلیل کنند، تصاویر جدید خلق کنند و راهکارهای خلاقانه و هوشمند برای مسائل واقعی ارائه دهند.

⚙این همان مسیری است که آینده تولید محتوا، بینایی کامپیوتر، پردازش تصویر، سیستم‌های چندوجهی (Multimodal AI) و نسل جدید محصولات مبتنی بر هوش مصنوعی را شکل می‌دهد؛ از خلق تصاویر و ویدئوهای هوشمند تا توسعه ابزارهای پیشرفته در حوزه‌های بازاریابی، رسانه، سلامت، صنعت و فناوری.

🟢 در این بوت‌کمپ ۱۲ هفته‌ای با آموزش‌های تخصصی، کارگاه‌های آنلاین، پروژه‌های واقعی و منتورینگ، شما را برای تبدیل شدن به یک متخصص حرفه‌ای در هوش مصنوعی مولد آماده می‌کنیم.

⏰ 170 ساعت | آموزش آنلاین و آفلاین
✍️ امکان ثبت‌نام از سراسر کشـور

✅ امکان کارآموزی در گروه همراه اول
✅ آموزش توسط اساتید برجسته دانشگاه و فعالان صنعت

⚠️ ظرفیت: محـدود


🌐 پیش‌ثبت‌نام رایگان:
🔗 https://l.hamrah.academy/4wh

⭐️ @Hamrah_Academy | آکادمی همراه اول

Читать полностью…

html and css آموزش

♦️شاید‌بزرگترین‌سرمایه‌تو،استعدادی‌باشه‌که‌هنوز‌ کشفش‌نکردی

⏳قبل‌از‌اینکه‌وقت‌وهزینه‌زیادی صرف‌یادگیری‌کنی،بهتره بدونی در چه زمینه ای استعداد بیشتری داری.

💡استعدادیابی دانشجویار‌با‌ بررسی ویژگی‌ها‌و‌علایق تو ، مسیرهایی رو پیشنهاد میده که می‌تونه با توانایی‌هات سازگارتر باشه

برای اطلاعات بیشتر اینجا کلیک کن

⚡️ انتخاب آگاهانه ، شانس موفقیت رو چند برابر میکنه

Читать полностью…

html and css آموزش

🚀هوش مصنوعیو اینجا بزار تو جیبت!!  @MobSec_Ai

➖➖➖➖➖➖➖➖➖➖➖➖
آموزش هوش و برنامه نویسی از پایه (کاملا رایگان)
🔗@Computer_IT_Engineering

بزرگ ترین کانال آموزشی حسابداری
🔗@noandishanhesabdari

آموزش گوشی موبایل و PC از صفر
🔗@Pc_IT_Mob

دوره ترید فارکس طلا
🔗@PUBPLUSX

آموزش 0 تا 100 هک و امنیت (رایگان)
🔗@Black_Security

برنامه نویسی Android از پایه (رایگان)
🔗@Android0to100

آگهی های استخدام مهندسین
🔗@job_engineering

منبع فایل لایه باز
🔗@shutterpic

دانلود فایل های PSD رایگان
🔗@Voxelproduction

هوش مصنوعی | کامپیوتر | تکنولوژی
🔗@zehnafzars

پروکسی فعال و vpn رایگان
🔗@Proxysarver

پایان نامه،مقاله،پروپزال،مهاجرت تحصیلی
🔗@journalacademic

آموزش فتوشاپ از مقدماتی تا پیشرفته
🔗@mrkhalaq

ترجمه کتاب ومقاله های دانشجویی
🔗@tarjjommee

استخدامی تخصصی کشور
🔗@STSHIMI95

ترفندهای خلاقانه کامپیوتر
🔗@pcmabani

دنیای پکیج های رایگان
🔗@wolfofwsfile

مهدی هک آموزش 0 تا 100 هک
🔗@Mahdiihack

آموزش رایگان نرم افزارهای مهندسی مکانیک
🔗@M_E_TUTORIAL

سفارش پروژه | پروژه بگیر
🔗@prozhebegir_ir

جزوه کده دانشگاهی
🔗@PDF_SHIMI

گروه معماری چهارسوق
🔗@CHAHAR_SOOGH_archi_gp

آموزش تخصصی زبان انگلیسی
🔗@WritingandGrammar1

علم داده و آمار
🔗@Amar_kadeh

آبجکت های 3 بعدی 3DMax
🔗@Voxel3DDVray

دانلود کتاب و پادکست کمیاب
🔗@farsiiketab

تست حسابداری(آزمون،کنکورو...)
🔗@tesathesabdarimomtaz

آموزش مکالمه زبان انگلیسی در 4 ماه
🔗@En_tour

کافه رویا
🔗@DreamCafe1018

صفرتاصد لپ تاپ و سخت افزار (کاملا رایگان)
🔗@PC_Laptop_Hardwares

آشپزی تلگرامی
🔗@telefoodgram

داستان های جذاب
🔗@Interesting_stories8

هوش مصنوعی، مقاله نویسی، اپلای
🔗@Innova_Lab

آموزش طراحی لوگو
🔗@mrkhalaqq

شُورِشِعر
🔗@sarayesheergazall402

آموزش شبکه مایکروسافت و سیسکو حرفه ای
🔗@modirshabake

تکنیک های خلاقانه فتوشاپ
🔗 @azphotoshopp

آموزش 0 تا 100 برنامه نویسی
🔗@cyberamooz_ir

دانلود آبجکت های REVIT
🔗@VoxelObjectRevit

ترفندهای کامپیوتر و نرم‌افزارها
🔗@spcware

عکس های 2026 دکوراسیون داخلی
🔗@Design_groooup

آموزش هوش مصنوعی در گرافیک
🔗@hashtagifyofficial

برنامه نویسی تخصصی  از پایه
🔗@programmer_best

مجموعه آبجکت های معماری
🔗@Archive_3D

مقاله ISI و رزومه نداری؟ با ما
🔗@resumedaran

تصاویر جذاب مهندسی
🔗@Shimi95_ir

آموزش 0 تا 💯 مقاله نویسی
🔗@payan_name9606

آموزش های جذاب برنامه نویسی
🔗@amozesh_co

انگلیسی رو با تست زدن فول شو
🔗@english_uniquee

دنیای آموزش های جذاب کامپیوتر
🔗@VIP30T

برنامه نویسی و طراحی وب سایت
🔗@hedcode

آموزش مقاله نویسی و research
🔗@med_article

کتابخانه ممنوعه
🔗@theBOOK_FRIENDS

آموزش HTML | CSS و JavaScript
🔗@htmlcss_channels

آموزش فتوشاپ 2026
🔗@azphotoshop

مرجع نقشه کشی صنعتی،ماشنیسازی (ساخت و تولید
🔗@CAD_3D

آموزش Python( از پایه تا پیشرفته )
🔗@Python4all_pro

آموزش Photoshop
🔗@VoxelLearn

تافل و آیلتس
🔗@class_englysh

آموزش تخصصی هوش‌مصنوعی و علم داده
🔗@programmers_street

نرم افرار Andriod موبایل
🔗@Android_best

اصلا کتاب نخرین! اینجا مفتی دانلود کنید هر رشته ای
🔗@Donyayejozveh

آموزش  فتوشاپ و ایلاستریتور
🔗@limostudy

نکات کاربردی TOEFL و IELTS
🔗@WritingandGrammar

حسابداری و مالیاتی
🔗@hesabdarimomtaz

تکسچر و آبجکت 3DMax
🔗@Voxel3DVray

دوره کامل ساخت V.P.N + کسب درآمد
🔗@PARSPUBLIC

دوره روش جدید کسب درآمد از یوتیوب
🔗@PACKPUBLICX

فقط پزشک و دانشجویان پزشکی عضو شوند
🔗@medipoints

آموزش طراحی وب + سئو از پایه (رایگان)
🔗@AmoozeshWebsite

آموزش حرفه ای پایتون
🔗@PythonForever

➖➖➖➖
@Armisstab

Читать полностью…

html and css آموزش

✅ JavaScript Objects – Interview Questions & Answers


🔹 1. What is an object in JavaScript?
An object is a collection of key-value pairs used to store related data and functionality.
Example:

const user = { name: "Alice", age: 25 };


🔹 2. How do you access object properties?
Using dot or bracket notation:
user.name  // "Alice"  
user["age"] // 25


🔹 3. How can you loop through an object?
Use for...in or Object.keys()/Object.entries():
for (let key in user) { console.log(key, user[key]); }


🔹 4. Difference between Object.freeze() and Object.seal()?
⦁ freeze() prevents any change (no adding, deleting, or modifying properties).
⦁ seal() allows value changes, but not adding/removing keys.

🔹 5. How do you clone an object?
const clone = {...user };  
// or
const copy = Object.assign({}, user);


🔹 6. What is this inside an object?
this refers to the object itself in method context.
const person = {
name: "Bob",
greet() { return `Hi, I’m ${this.name}`; }
};


🔹 7. How do prototypes relate to objects?
Every JS object has a hidden [[Prototype]]. It lets objects inherit properties from others.

🔹 8. What is a constructor function?
A function used to create multiple similar objects:
function User(name) {
this.name = name;
}
const u = new User("Tom");


🔹 9. What's the difference between Object.create() and new keyword?
⦁ Object.create(proto) creates an object with the given prototype.
⦁ new invokes a constructor function to initialize objects.

🔹 10. How do you check if a property exists in an object?
"name" in user // true
user.hasOwnProperty("age") // true

💬 Tap ❤️ for more!


💎 @Htmlcss_channels | #css #JavaScript #HTML #interview

Читать полностью…

html and css آموزش

جدیدترین ابزار تبدیل عکس به ویدیو با هوش مصنوعی آنلاین شد! 🔥
یه عکس آپلود کن و شخصیت‌ها رو زنده کن! حرکات طبیعی و روان با جزئیات فوق‌العاده واقع‌گرایانه

Читать полностью…

html and css آموزش

🔥 The latest AI-powered image-to-video generator is now online! 🔥 Upload a picture and bring the characters within to life, making them move naturally according to your vision! The visuals are smooth and natural, with incredibly realistic details.

Supports a variety of alluring actions:

✅ Gently lift a garment

✅ A suggestive kiss

✅ Various seductive poses

✅ Passionately tearing clothes

✅ Immersive expressions

✅ ...and many more features await your exploration! Instantly transform static images into dynamic videos with amazing effects!

💰 Referral Rewards: Earn 50% commission for every user you refer who makes a purchase! Your chance to earn passive income is here! 💸

🚀 Experience it now → @Fans365vip_bot

Читать полностью…

html and css آموزش

فقط با ۲۸ میلیون تومن ۲میلیون و ۸۰۰ تومن
تمام دوره‌های برنامه‌نویسی، علم داده و هوش مصنوعی اسکیل کمپ دانشکار رو فقط با یک اشتراک داشته باش!
۹۰٪ تخفیف رو از اینجا دریافت کن👇
🔗https://dnkr.ir/k7Kq8

Читать полностью…

html and css آموزش

Gradient Button Animation


Code




💎 @Htmlcss_channels

Читать полностью…

html and css آموزش

نسل بعدی ابزارهایی مثل فیگما هم رسید.

با Paper هر پروداکت منیجری می‌تونه هم دیزاینر باشه، هم برنامه‌نویس.
مرز بین ایده، طراحی و کد داره عملاً حذف میشه.

پیپر یه Canvas هوشمنده برای Cursor، Claude Code و...
هر ایجنتی می‌تونه HTML بخونه و بنویسه داخلش.

‏با پیپر می‌تونی:
• به کدبیس‌ات push یا ازش pull کنی
• دیتای واقعی رو از هر جایی بیاری داخل طراحی
• کمتر کار تکراری کنی، بیشتر طراحی کنی

حتی می‌تونی ابزارهای AI خودت رو از طریق MCP مستقیم وصل کنی که بخونن و بنویسن.
؛MCP Server داخل Paper ابزارها و اینسترکشن‌های دقیق به ایجنتت میده تا یه دیزاین هم زیبا باشه هم کاربردی.


💎 @Htmlcss_channels

Читать полностью…

html and css آموزش

فقط با یک پرامپت سایتی که دوست دارید رو بسازید و ادیت کنید.
https://build.cloudflare.dev/
کم کم سایت هایی ایرانی هم داره با استفاده از این سرویس ساخته میشه ، نمونه هارا در لینک زیر ببینید
https://build.cloudflare.dev/discover

خیلی ها هنوز تصورشون از Cloudflare فقط CDN برای سایت است!...
میخوام دعوتتون کنم به ابزار
http://Build.cloudflare.dev
یک‌محیط رایگان برای تبدیل ایده هاتون به سایت ! با قابلیت دپلوی رایگان روی کلاد فلر!

به سادگی فقط بهش بگید چی میخواهید و بزارید کار رو براتون انجام بده!


💎 @Htmlcss_channels

Читать полностью…

html and css آموزش

🔥 به علت وضعیت موجود در کشور، عضویت در تمامی کانال ها زیر رایگان شده؛ از این فرصت استفاده کنید 👇🏽👇🏽

🔑
@Armisstab

🔻🔻🔻🔻🔻🔻🔻🔻🔻
🟢برنامه نویسی و طراحی سایت
@Computer_IT_Engineering
@PythonForever
@AmoozeshWebsite
@Android0to100
@programmers_street
@Python4all_pro
@htmlcss_channels
@amozesh_co
@programmer_best
@hivaweb
@cyberamooz_ir

🔻🔻🔻🔻🔻🔻🔻🔻🔻
🟢هک و امنیت
@Mahdiihack
@EngineeringReverse
@hivashabake

🔻🔻🔻🔻🔻🔻🔻🔻🔻
🟢موبایل و کامپیوتر
@Pc_IT_Mob
@Software_computerr
@Android_best
@repairms
@VIP30T
@pcmabani
@spcware
@PC_Laptop_Hardwares

🔻🔻🔻🔻🔻🔻🔻🔻🔻
🟢شبکه
@modirshabake

🔻🔻🔻🔻🔻🔻🔻🔻🔻
🟢پکیج و دوره رایگان
@PUBPLUSX
@PACKPUBLICX
@PARSPUBLIC
@wolfofwsfile
@wolfofws

🔻🔻🔻🔻🔻🔻🔻🔻🔻
🟢زبان خارجه و مهاجرت
@WritingandGrammar
@PTEnglishtest1
@Eng_Online
@EnglishCartoonn2024
@english_uniquee
@novinenglish_new
@WritingandGrammar1
@En_tour
@en_quizztour

🔻🔻🔻🔻🔻🔻🔻🔻🔻
🟢استخدام و کاریابی
@JOB_FREELANCER
@UNII_KAR
@prozhebegir_ir
@Project_jobplus

🔻🔻🔻🔻🔻🔻🔻🔻🔻
🟢عمومی
@theBOOK_FRIENDS
@farsiiketab
@telefoodgram

🔻🔻🔻🔻🔻🔻🔻🔻🔻
🟢فایل های گرافیکی
@shutterpic
@fonteditbyy
@filmeditby

🔻🔻🔻🔻🔻🔻🔻🔻🔻
🟢مهندسی مکانیک و برق
@mech_engineering
@CAD_3D
@bargheeha
@electronicghodrat
@M_E_TUTORIAL
@electricalnew
@engineersbargh
@automatsin
@proje_bargh
@margarinepower
@doorbingram
@electric_ir
@clipbargh
@barghtamasha
@smartelectric
@fazmetr

🔻🔻🔻🔻🔻🔻🔻🔻🔻

🟢هوش مصنوعی
@max_academy
@zehnafzars
@hashtagifyofficial

🔻🔻🔻🔻🔻🔻🔻🔻🔻
🟢پروکسی
@Proxysarver

🔻🔻🔻🔻🔻🔻🔻🔻🔻
🟢دانشجویی و دانشگاهی
@UNIVERSITY_BOOKSS
@akhtar_electronic_group
@powerpointyar
@ENG_PODCAST
@VR_LEARNING_ENGLISH2
@hamyarjozve
@daneshgram
@ES_Story
@EN_4_KIDS
@BR_PODCAST
@VR_LEARNING_ENGLISH
@EN_Listenings
@VR_ENGLISH_TEXT
@EN_Videos
@English_Video_EV
@BookUp

🔻🔻🔻🔻🔻🔻🔻🔻🔻
🟢آموزش فتوشاپ
@Architect_City
@limostudy
@Voxelproduction
@VoxelLearn

🔻🔻🔻🔻🔻🔻🔻🔻🔻
🟢فناوری و تکنولوژی
@ProductionLine
@Power4u
@aircraft_ir
@INFORMATIONINSTITUTE
@ScienticNews

🔻🔻🔻🔻🔻🔻🔻🔻🔻
🟢معماری و عمران
@Voxel3DVray
@maghalatememari
@CHAHAR_SOOGH_archi_gp
@Design_groooup
@tarrahimemari
@Voxel3DDVray
@VoxelObjectRevit
@archnoghtechin
@Arch_referece

🔻🔻🔻🔻🔻🔻🔻🔻🔻

💥هم یاد بگیر، هم باخبر شو — دنیای هوش مصنوعی اینجاست:
@MobSec_Ai

🔻🔻🔻🔻🔻🔻🔻🔻🔻
.

Читать полностью…

html and css آموزش

☯️ دوره جامع علم داده (Data Science)

🧠 از مفاهیم پایه تا پروژه‌های واقعی
🐍 به همراه آموزش Python و SQL Server

💯 دوره آنلاین #علم_داده مناسب برای:

✔️ دانشجوها ✔️ تحلیلگران داده ✔️کارکنان واحدهای تخصصی
و
⭐️ افرادی که دنبال تغییر مسیر شغلی به دنیای تحلیلگری داده و دیتاساینس هستن

📌 مشاوره رایگان + مشاهده جزئیات دوره:

🔗 httb.ir/LDGEm

⚪️ گواهینامه معتبر مؤسسه توسعه
---
📈 جمع‌بندی سریع:
✅ دوره آنلاین
✅ شروع با مفاهیم پایه
✅ یادگیری ماشین Python، (ML) و شبکه‌های عصبی
✅ آموزش با Case Study ها و تحلیل‌ها از صنایع و حوزه‌های متعدد

Читать полностью…

html and css آموزش

Modern Input Label Hover & Focus Animation



💎 @Htmlcss_channels

Читать полностью…

html and css آموزش

Glassmorphism Login Form Using HTML & CSS | Step-by-Step Full Tutorial



💎 @Htmlcss_channels

Читать полностью…

html and css آموزش

🚀 JavaScript Interview Questions with Answers — Part 4

31. What is if/else and switch?

Both are conditional statements used to make decisions in JavaScript.

if/else 
Executes code based on conditions. 

let age = 18;

if (age >= 18) {
    console.log("Adult");
} else {
    console.log("Minor");
}


switch 
Used when checking multiple possible values. 

let day = 2;

switch(day) {
    case 1:
        console.log("Monday");
        break;

    case 2:
        console.log("Tuesday");
        break;

    default:
        console.log("Invalid Day");
}


Difference: 
if/else - Better for conditions/ranges, Flexible 
switch - Better for exact values, Cleaner for many cases

32. What is the difference between for, for...in, and for...of?

for 
Traditional loop. 

for (let i = 0; i < 3; i++) {
    console.log(i);
}


for...in 
Used for iterating object keys. 

const person = {
    name: "Deepak",
    age: 25
};

for (let key in person) {
    console.log(key);
}


for...of 
Used for iterable values like arrays. 

const nums = [1, 2, 3];

for (let num of nums) {
    console.log(num);
}


Key Difference: 
Loop - Best For 
for - Full control 
for...in - Object properties 
for...of - Array values

33. What is the while and do-while loop?

Both loops execute code repeatedly while a condition is true.

while Loop 
Condition checked before execution. 

let i = 1;

while (i <= 3) {
    console.log(i);
    i++;
}


do-while Loop 
Runs at least once before checking condition. 

let i = 1;

do {
    console.log(i);
    i++;
} while(i <= 3);


Difference: 
while - Condition first, May run zero times 
do-while - Code first, Runs at least once

34. What is the ternary operator?

The ternary operator is a shorthand for if/else.

Syntax: 
condition? trueValue : falseValue

Example: 

let age = 20;

let result = age >= 18 ? "Adult" : "Minor";

console.log(result);


Benefits: 
• Shorter code
• Cleaner simple conditions

35. What is short-circuit evaluation?

JavaScript stops evaluating expressions as soon as the result is known.

Using && 
Returns first falsy value. 

console.log(false && "Hello");


Output: 
false

Using || 
Returns first truthy value. 

console.log("" || "Default");


Output: 
Default

Practical Example: 

let username = "";

let displayName = username || "Guest";

console.log(displayName);


36. What is the difference between break and continue?

Keyword - Purpose 
break - Stops the loop completely 
continue - Skips current iteration

break Example 

for (let i = 1; i <= 5; i++) {
    if (i === 3) {
        break;
    }
    console.log(i);
}


Output: 
1 
2

continue Example 

for (let i = 1; i <= 5; i++) {
    if (i === 3) {
        continue;
    }
    console.log(i);
}


Output: 
1 
2 
4 
5

37. How do you iterate over an array or object?

Array Iteration 
Using forEach() 

const nums = [1, 2, 3];

nums.forEach(num => {
    console.log(num);
});


Object Iteration 
Using for...in 

const person = {
    name: "Deepak",
    age: 25
};

for (let key in person) {
    console.log(key, person[key]);
}


Using Object.keys() 

Object.keys(person).forEach(key => {
    console.log(key);
});


38. How do you implement recursion?

Recursion is when a function calls itself until a stopping condition is met.

Example: Factorial

function factorial(n) {
    if (n === 1) {
        return 1;
    }
    return n * factorial(n - 1);
}

console.log(factorial(5));


Output: 
120

Important Parts: 
1. Base condition
2. Recursive call

Without a base condition → infinite recursion.

Читать полностью…

html and css آموزش

🚀 JavaScript Interview Questions with Answers — Part 3

21. What is an array in JavaScript?
An array is a special object used to store multiple values in a single variable.

Example:
const fruits = ["Apple", "Banana", "Mango"];

Access Elements:
console.log(fruits[0]); // Apple

Features:
• Ordered collection
• Zero-based indexing
• Can store mixed data types

Example:
const data = ["Deepak", 25, true];

22. How do you add/remove elements from an array?

Add Elements
push() → Add at end
const arr = [1, 2];
arr.push(3);
console.log(arr);

unshift() → Add at beginning
arr.unshift(0);

Remove Elements
pop() → Remove from end
arr.pop();
shift() → Remove from beginning
arr.shift();

Example:
const numbers = [1, 2, 3];
numbers.push(4);
numbers.pop();
console.log(numbers);

23. What is the difference between push(), pop(), shift(), unshift()?
push() → Add element at end
pop() → Remove element from end
shift() → Remove element from start
unshift() → Add element at start

Example:
const arr = [1, 2];
arr.push(3);
arr.unshift(0);
console.log(arr);
arr.pop();
arr.shift();
console.log(arr);
Output:
[0][1][2][3]

24. What is map(), filter(), and reduce()?
These are important array methods used in functional programming.

map()
Creates a new array by transforming elements.
const nums = [1, 2, 3];
const doubled = nums.map(num => num * 2);
console.log(doubled);

Output:
[2][4][6]

filter()
Returns elements matching a condition.
const nums = [1, 2, 3, 4];
const even = nums.filter(num => num % 2 === 0);
console.log(even);

Output:
[2][4]

reduce()
Reduces array to a single value.
const nums = [1, 2, 3];
const sum = nums.reduce((total, num) => total + num, 0);
console.log(sum);

Output:
6

25. How do you remove duplicates from an array?

Using Set
const nums = [1, 2, 2, 3, 4, 4];
const unique = [...new Set(nums)];
console.log(unique);

Output:
[1][2][3][4]

Why Set?
A Set stores only unique values.

Alternative Using filter()
const arr = [1, 2, 2, 3];
const unique = arr.filter((item, index) =>
arr.indexOf(item) === index
);
console.log(unique);

26. How do you flat / flatten an array?
Flattening means converting nested arrays into a single array.

Using flat()
const arr = [1, [2, 3], [4, 5]];
console.log(arr.flat());

Output:
[1][2][3][4][5]

Deep Flatten:
const arr = [1, [2, [3, 4]]];
console.log(arr.flat(Infinity));

Using reduce()
const arr = [[1, 2], [3, 4]];
const flat = arr.reduce((acc, val) => acc.concat(val), []);
console.log(flat);

27. What is an object in JavaScript?
An object is a collection of key-value pairs.

Example:
const person = {
name: "Deepak",
age: 25,
city: "Oslo"
};

Access Properties:
console.log(person.name);

Objects Can Store:
• Strings
• Numbers
• Arrays
• Functions
• Other objects

28. What is the difference between dot and bracket notation?

Dot Notation
console.log(person.name);

Bracket Notation
console.log(person["name"]);

Dot Notation
• Simple syntax
• Faster to write

Bracket Notation
• Dynamic keys supported
• Useful for spaces/special chars

Example:
const obj = {
"first name": "Deepak"
};
console.log(obj["first name"]);

29. How do you merge two objects?

Using Spread Operator
const obj1 = {a: 1};
const obj2 = {b: 2};
const merged = {...obj1,...obj2};
console.log(merged);

Output:
{a: 1, b: 2}

Using Object.assign()
const merged = Object.assign({}, obj1, obj2);

Important:
If duplicate keys exist, later values overwrite earlier ones.

30. How do you deep clone an object? 
Deep cloning creates a completely independent copy of an object.

Using structuredClone()  
const obj = {  
    name: "Deepak",  
    address: {  
        city: "Oslo"  
    }  
};  
const clone = structuredClone(obj);

Using JSON Method  
const clone = JSON.parse(JSON.stringify(obj));

💌 Double Tap ❤️ For Part-4


💎 @Htmlcss_channels | #css #JavaScript #HTML #interview

Читать полностью…

html and css آموزش

✅ JavaScript Practice Questions – Part 2 💻🔥

🔍 Q1. Swap two variables without a third variable.
✅ Answer:

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


🔍 Q2. Find the largest number in an array.
✅ Answer:
let numbers = [3, 7, 2, 9, 5];
let max = Math.max(...numbers);
console.log(max); // Output: 9


🔍 Q3. Check if a number is prime.
✅ Answer:
function isPrime(n) {
if (n <= 1) return false;
for (let i = 2; i <= Math.sqrt(n); i++) {
if (n % i === 0) return false;
}
return true;
}

console.log(isPrime(7)); // Output: true


🔍 Q4. Count vowels in a string.
✅ Answer:
function countVowels(str) {
return str.match(/[aeiou]/gi)?.length || 0;
}

console.log(countVowels("Hello World")); // Output: 3


🔍 Q5. Convert first letter of each word to uppercase.
✅ Answer:
let sentence = "hello world";
let titleCase = sentence.split(" ").map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");

console.log(titleCase); // Output: Hello World


💬 Tap ❤️ for Part 3!


💎 @Htmlcss_channels | #css #JavaScript #HTML #interview

Читать полностью…

html and css آموزش

✅ JavaScript Practice Questions with Answers 💻⚡

🔍 Q1. How do you check if a number is even or odd?
✅ Answer:

let num = 10;
if (num % 2 === 0) {
console.log("Even");
} else {
console.log("Odd");
}


🔍 Q2. How do you reverse a string?
✅ Answer:
let text = "hello";
let reversedText = text.split("").reverse().join("");
console.log(reversedText); // Output: olleh


🔍 Q3. Write a function to find the factorial of a number.
✅ Answer:
function factorial(n) {
let result = 1;
for (let i = 1; i <= n; i++) {
result *= i;
}
return result;
}

console.log(factorial(5)); // Output: 120


🔍 Q4. How do you remove duplicates from an array?
✅ Answer:
let items = [1, 2, 2, 3, 4, 4];
let uniqueItems = [...new Set(items)];
console.log(uniqueItems);


🔍 Q5. Print numbers from 1 to 10 using a loop.
✅ Answer:
for (let i = 1; i <= 10; i++) {
console.log(i);
}


🔍 Q6. Check if a word is a palindrome.
✅ Answer:
let word = "madam";
let reversed = word.split("").reverse().join("");
if (word === reversed) {
console.log("Palindrome");
} else {
console.log("Not a palindrome");
}


💬 Tap ❤️ for more!


💎 @Htmlcss_channels | #css #JavaScript #HTML #interview

Читать полностью…

html and css آموزش

Split Landing Page

⤷ Code


💎 @Htmlcss_channels

Читать полностью…

html and css آموزش

Animated SVG Hover Buttons

Code

💎 @Htmlcss_channels

Читать полностью…

html and css آموزش

Wavy Background Animation [Pure CSS]


Code


💎 @Htmlcss_channels

Читать полностью…

html and css آموزش

Sea Mode


⤷ code


💎 @Htmlcss_channels

Читать полностью…

html and css آموزش

Form elements in #HTML



💎 @Htmlcss_channels

Читать полностью…

html and css آموزش

💙 ۱ میلیون اعتبار هدیه کوئرایی ثبت‌نام دوره‌های برنامه‌نویسی و هوش‌مصنوعی فقط برای ۲۴ ساعت!

🔥همراه با تخفیف‌های ویژه:
🔹۳۰٪ تخفیف روی دوره‌های پیشرفته
🔹۳۵٪ تخفیف روی مسیرهای برنامه‌نویسی از صفر تا صد

چه دوره‌هایی داریم؟
🔹
پایتون مقدماتی | پایتون پیشرفته | جنگو
🔹 مبانی برنامه‌نویسی و تفکر الگوریتمی
🔹 دوره Html Css | فرانت‌اند مقدماتی | ری‌اکت
🔹اتوماسیون با n8n
🔹 هک و امنیت
و کلی دوره مقدماتی و پیشرفته دیگه...

🌱 حتی اگه عضو کوئرا نیستی، به محض ثبت‌نام ۱ میلیون اعتبار هدیه می‌گیری.
💳 پرداخت در ۴ قسط

✨مشاهده دوره‌ها و ثبت‌نام:
🔗https://quera.org/r/xgn21

Читать полностью…

html and css آموزش

کاملترین دسته بندی کانالهای آموزشی
👇👇
/channel/addlist/Fv-izhLQK94yOWVk

Читать полностью…

html and css آموزش

🔰 Smooth Scrolling with CSS Snap

Learn how to create scroll-able sections and carousels using just CSS Scroll Snap. No JavaScript needed. This guide breaks it down in 6 slides with examples, tips, and visuals.




💎 @Htmlcss_channels

Читать полностью…

html and css آموزش

: Social Media Icons Hover Effects 🔥 HTML & CSS

#webdevelopment #coding #html #css



💎 @Htmlcss_channels

Читать полностью…

html and css آموزش

هوش مصنوعی مولد این‌جا فقط یه ابزار نیست؛
یه سیستمه که خودت می‌سازی، آموزش می‌دی و به محصول وصل می‌کنی.

اگه پایتون بلدی، تو دوره Generative AI ظرف ۲ ماه یاد می‌گیری چطور یه مدل رو از صفر بالا بیاری
و چطور تبدیلش کنی به فیچری که کسب‌وکارها واقعا نیاز دارن.
✨ و این یعنی ساخت آینده، نه صرفاً استفاده ازش.

⭕️ روی لینک زیر کلیک کن👇
🔗https://dnkr.ir/kPp87

Читать полностью…

html and css آموزش

Simple To-Do List App Using JavaScript


💎 @Htmlcss_channels

Читать полностью…
Subscribe to a channel