GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

No menu could be recovered. Follow the blue links in the page.

This view

  • Original page
  • New address

GeezerVison is showing uz.javascript.info — Ikkinchi bog'lash

  • Qo'llanma
  • JavaScript dasturlash tili
  • Funktsiyalar bilan ilg'or ishlash
  • Funktsiyani bog'lash
darsga qaytish

Ikkinchi bog'lash

Qo’shimcha bog’lash orqali this ni o’zgartira olamizmi?

Chiqish qanday bo’ladi?

function f() {
  alert(this.name);
}

f = f.bind({ name: "John" }).bind({ name: "Ann" });

f();

Javob: John.

function f() {
  alert(this.name);
}

f = f.bind({ name: "John" }).bind({ name: "Pete" });

f(); // John

f.bind(...) tomonidan qaytarilgan ekzotik bog’langan funktsiya obyekti kontekstni eslaydi (va argumentlar, agar taqdim etilsa) faqat yaratilish vaqtida.

Funksiyani qayta bog’lab bo’lmaydi.

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.