شما اینجا هستید

label یک شناسه است که با استفاده از آن میتوان به هر کجا از برنامه که میخواهیم رجوع کنیم.

برای مثال، میتوان از یک label برای ایجاد حلقه و سپس برای متوقف کردن یا ادامه اجرای حلقه از دستورات break و continue استفاده کرد.

سینتکس دستور label شبیه نمونه زیر است:

label :

statement

 

به جای label ممکن است هر شناسه معتبر در جاوااسکریپت که جزو کلمات رزرو شده هم نباشد قرار بگیرد. Statement هم ممکن است هر دستوری باشد.

مثال

در این مثال، برچسب markloop نشانگری برای حلقه while است.

markLoop:

while (theMark == true) {

doSomething();

}

 

توجه کنید که جاوا اسکریپت دارای دستور goto نمیباشد، و فقط میتوان از برچسبها به همراه break و continue استفاده کرد.

مثالهای برچسب

طریقه استفاده از continue برچسب گذاری شده با حلقه for

var i, j;


loop1:

for (i = 0; i < 3; i++) { //The first for statement is labeled "loop1"

loop2:

for (j = 0; j < 3; j++) { //The second for statement is labeled "loop2"

if (i == 1 && j == 1) {

continue loop1;

}

console.log("i = " + i + ", j = " + j);

}

}


// Output is:

// "i = 0, j = 0"

// "i = 0, j = 1"

// "i = 0, j = 2"

// "i = 1, j = 0"

// "i = 2, j = 0"

// "i = 2, j = 1"

// "i = 2, j = 2"

// Notice how it skips both "i = 1, j = 1" and "i = 1, j = 2"

 

طریقه استفاده از continue برچسب گذاری شده با حلقه for

var i, j;


loop1:

for (i = 0; i < 3; i++) { //The first for statement is labeled "loop1"

loop2:

for (j = 0; j < 3; j++) { //The second for statement is labeled "loop2"

if (i == 1 && j == 1) {

break loop1;

}

console.log("i = " + i + ", j = " + j);

}

}


// Output is:

// "i = 0, j = 0"

// "i = 0, j = 1"

// "i = 0, j = 2"

// "i = 1, j = 0"

// Notice the difference with the previous continue example

 

دیدگاه‌ها

Comprar Cialis Por Transferencia Bancaria canadian cialis Europa Kamagra Vendita Viagra Alle Donne Propecia 2mg

make money from home part time work from home osrs money making guide how to make money from home money making apps

make money from home how to make money from home smart passive income passive income opportunities how to make money on youtube

https://make-money-blogs.com/# - osrs money making guide

money making apps how to make easy money free money online work from home jobs amazon online poker real money

walmart to walmart money transfer online make money how to make money on the internet ways to make money fast ways to make extra money

https://make-money-blogs.com/# - how does facebook make money

coronavirus vaccine schedule coronavirus symptoms in dogs what is coronavirus in cats dog coronavirus the coronavirus

fip coronavirus coronavirus replication cdc mers coronavirus coronavirus cats coronavirus in babies

https://pharm-usa-official.com/coronavirus/# - canine coronavirus symptoms

weight loss calculator optavia weight loss weight loss diet melissa mccarthy weight loss rapid weight loss

weight loss clinic gabourey sidibe weight loss before and after celine dion weight loss instagram restrict weight loss before and after weight loss

https://weight-loss-blogs.com/# - weight loss clinic

weight loss clinic near me best foods for weight loss weight loss surgery fasting for weight loss wellbutrin weight loss

golo weight loss best weight loss diet best diet for weight loss gabourey sidibe weight loss keto weight loss

https://weight-loss-blogs.com/# - honey boo boo weight loss

adele weight loss saxenda for weight loss medical weight loss jorge garcia weight loss kirsten vangsness weight loss

macros for weight loss weight loss clinics near me weight loss programs weight loss blogs weight loss icd 10

https://weight-loss-blogs.com/# - rebel wilson weight loss

john goodman weight loss metformin for weight loss apple cider vinegar weight loss gabourey sidibe weight loss medi weight loss

metformin for weight loss quick weight loss weight loss meal plans weight loss motivation kelly clarkson weight loss

https://weight-loss-blogs.com/# - weight loss supplements

fast weight loss beth chapman weight loss weight loss programs weight loss coffee best weight loss pills

intermittent fasting weight loss best protein powder for weight loss apple cider vinegar weight loss medically proven weight loss supplements joe thomas weight loss

https://weight-loss-blogs.com/# - keto weight loss

pfizer viagra coupons viagra dosage? viagra viagra testimonials from women ecstasy and viagra

viagra patent expiration viagra vs levitra reviews viagra does viagra work viagra alternative at walmart

https://pharm-usa-official.com - viagra

viagra and health benefits does medicare cover viagra viagra vitamins that work like viagra viagra hints

safe alternatives to viagra and cialis viagra replacement viagra average age men use viagra viagra real cheap price

https://pharm-usa-official.com - viagra

tadalafil 20mg avis tadalafil powder buy tadalafil online tadalafil generic usa tadalafil generique

cialis tadalafil tadalafil biogaran tadalafil 5mg tadalafil for women tadalafil 20 mg best price

https://supertadalafil.com/ - tadalafil liquid

tadalafil 10mg tadalafil 20mg prix generic cialis tadalafil tadalafil biogaran 20 mg prix buy tadalafil online

tadalafil 20 mg tablet tadalafil 20 mg wirkungsdauer cialis tadalafil sildenafil vs tadalafil tadalafil 20 mg wirkungsdauer

https://xtadalafilx.com/ - cialis tadalafil

tadalafil 20 mg best price tadalafila 20mg generic cialis tadalafil tadalafil canadian pharmacy tadalafil liquid

generic tadalafil tadalafil 10mg prix tadalafil liquid liquid tadalafil side effects for tadalafil

https://supertadalafil.com/ - tadalafil reviews

cialis generic tadalafil tadalafil powder tadalafil dosage tadalafil for women tadalafil generic

tadalafil side effects tadalafil dosage generic cialis tadalafil tadalafil pronunciation tadalafil powder

https://xtadalafilx.com/ - tadalafil reviews

tadalafil side effects tadalafil generic usa tadalafil 20 mg tadalafil biogaran tadalafil biogaran

tadalafil generique tadalafil 20 mg wirkungsdauer tadalafil cialis tadalafil prix tadalafil 20 mg prix

https://supertadalafil.com/ - tadalafil liquid

tadalafil biogaran prix tadalafil 10 mg generic tadalafil tadalafil 20 mg wirkungsdauer sildenafil vs tadalafil

buy cialis ebay find tadalafil tadalafil cialis tadalafil generic tadalafil en ligne tadalafil en ligne

https://xtadalafilx.com/ - tadalafil cialis

tadalafil dosage what is tadalafil tadalafil 20mg tadalafil prix en pharmacie tadalafil biogaran 20 mg prix

tadalafil cost cvs tadalafil cost cvs tadalafil cialis tadalafil powder generic for cialis tadalafil

https://supertadalafil.com/ - tadalafil dosage

what is tadalafil tadalafil 20mg avis cheap tadalafil tadalafil 20mg tadalafil vs viagra

tadalafil side effects tadalafil online canadian pharmacy tadalafil cialis tadalafil generic vs cialis tadalafil 20 mg

https://xtadalafilx.com/ - cialis tadalafil

sildenafil vs tadalafil tadalafil 10mg tadalafil 20mg buy tadalafil tadalafila

tadalafil generique cialis-impuissance tadalafil tadalafil 20 mg tadalafil cost tadalafil cost

https://supertadalafil.com/ - tadalafil 20mg

cialis vs tadalafil generic tadalafil generic generic tadalafil tadalafil 5mg prix cialis vs tadalafil generic

tadalafil 40 mg tadalafil citrate tadalafil 5mg tadalafil 20 mg tablet liquid tadalafil

https://xtadalafilx.com/ - generic cialis tadalafil

tadalafil 40 mg buy cialis ebay find tadalafil tadalafil 5mg interactions for tadalafil generic cialis tadalafil 20mg

tadalafil tablets adcirca tadalafil cialis tadalafil liquid tadalafil tadalafil prix en pharmacie

https://supertadalafil.com/ - tadalafil 20mg

tadalafil vs sildenafil generic cialis tadalafil 40 mg buy tadalafil online tadalafila 20mg buy tadalafil online

vardenafil vs tadalafil tadalafil online tadalafil liquid purchase peptides tadalafil cialis-impuissance tadalafil

https://xtadalafilx.com/ - buy tadalafil online

testosterone for women testosterone levels by age testosteron foods that boost testosterone prime male testosterone booster

how to naturally increase testosterone testosterone propionate testosteron testosterone overdose testosterone booster for men

https://pharm-usa-official.com/testosterone.php - testosterone injections

vardenafil levitra levitra online cialis 20mg levitra com levitra price

buy levitra online levitra 10 mg levitra coupon cheap levitra levitra generic

https://drugstoreonliner.com/ - viagra vs cialis

vardenafil levitra levitra cost generic levitra online levitra for sale viagra vs cialis

levitra 20mg levitra 20 levitra 10mg levitra cost cheap levitra

https://drugstoreonliner.com/ - levitra 20mg

testosterone cypionate 200mg/ml male hormones Test Cyp effects of low testosterone in men testosterone replacement therapy

foods that increase testosterone foods that raise testosterone TestoBolin testosterone for women testosterone shots

https://pharm-usa-official.com/testosterone.php - low testosterone

avast free antivirus windows antivirus https://xantivirusx.com/ - norton antivirus login dating women over age 50 norway women for dating https://onlinedatingwow.com/ - dirty dating live pch sweepstakes sweepstakes advantage https://supersweepstakesx.com/ - bassmaster fish with randy howell sweepstakes

antivirus microsoft antivirus https://xantivirusx.com/ - norton antivirus login free dating sites no fees christian mingle dating site https://onlinedatingwow.com/ - who is dating whom hgtv sweepstakes bhg sweepstakes https://supersweepstakesx.com/ - sweepstakes 2017

double u casino
hollywood casino play4fun
https://playcasinoslotsx.com - chumba casino
how to lose weight fast
weight watchers
https://weight-loss-blogs.com - best way to lose weight
how to get money
how to make money online
https://make-money-blogs.com - how to earn money

cashman casino
hollywood casino free slots
https://playcasinoslotsx.com - double u casino
how to lose weight quickly
how to lose weight quick
https://weight-loss-blogs.com - how to lose weight quick
how to make money from home
how to make money from home
https://make-money-blogs.com - how to make money online

chumba casino
double u casino
https://playcasinoslotsx.com - foxwoods casino
diet plan
how to lose weight fast
https://weight-loss-blogs.com - how to lose weight in a week
how to earn money online
how to make money online
https://make-money-blogs.com - how to make

palms casino vegas unstatus quo
twin river casino
https://playcasinoslotsx.com - big fish casino
weight calculator
weight loss programs
https://weight-loss-blogs.com - best weight loss pills
how to make money online
how to earn money online
https://make-money-blogs.com - how to earn money

casino
vegas world casino
https://playcasinoslotsx.com - borgata online casino
how to lose weight fast
adele weight loss
https://weight-loss-blogs.com - losing weight
how to earn money
how to make money online
https://make-money-blogs.com - how to make money online

cialis coupon code generic viagra
bestpricemedz.com generic viagra

cialis dosage 40 mg dangerous cialis tadalafil
real cialis without a doctor's prescription: http://tadalafilprof.com

normal dose cialis cialis generic
5 mg cialis coupon printable: http://tadalafilprof.com

افزودن دیدگاه جدید

دیدگاه

  • تگ‌های HTML مجاز: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <img>
  • خطوط و پاراگراف‌ها بطور خودکار اعمال می‌شوند.
  • نشانی صفحه‌ها وب و پست الکترونیک بصورت خودکار به پیوند تبدیل می‌شوند.

Plain text

  • تگ‌های HTML مجاز نیستند.
  • نشانی صفحه‌ها وب و پست الکترونیک بصورت خودکار به پیوند تبدیل می‌شوند.
  • خطوط و پاراگراف‌ها بطور خودکار اعمال می‌شوند.
كد امنيتي
این پرسش برای جلوگیری از ارسال اسپمهای اتوماتیک است.