Cov txheej txheem:

Hom twg yog muab rau qhov sib txawv nrog hom tsis muaj npe?
Hom twg yog muab rau qhov sib txawv nrog hom tsis muaj npe?

Video: Hom twg yog muab rau qhov sib txawv nrog hom tsis muaj npe?

Video: Hom twg yog muab rau qhov sib txawv nrog hom tsis muaj npe?
Video: raug tso lawm ces 2024, Hlis ntuj nqeg
Anonim

Hom Tsis Txaus

Koj tuaj yeem tshaj tawm a sib txawv ntawm type tsis siv cov tsis muaj keyword thiab tau muab xwb tsis muaj nqi rau nws. Raws li tsis muaj yog subtype ntawm txhua lwm yam hom , koj ua tau muab nws mus rau tus lej lossis tus nqi boolean.

Hais txog qhov no, yam twg tau muab rau qhov hloov pauv nrog hom tsis muaj nyob hauv TypeScript?

json, tsuas yog tus nqi tsis muaj yog assignable rau sib txawv nrog hom tsis muaj npe . Tus chij no raug muab tua los ntawm lub neej ntawd, uas txhais tau hais tias koj tuaj yeem ua tau muab tus tsis muaj tus nqi rau sib txawv nrog lwm tus hom zoo li tus lej lossis tsis muaj dab tsi.

Tsis tas li ntawd, hom ntawv twg yog TypeScript? Txawm li cas los xij, TypeScript yog hom lus ntaus ntawv, qhov uas peb tuaj yeem hais qhia yam ntawm cov kev hloov pauv, kev ua haujlwm tsis zoo thiab cov khoom khoom. Peb tuaj yeem qhia qhov yam siv: Hom tom qab lub npe ntawm qhov sib txawv, qhov ntsuas lossis khoom. TypeScript suav nrog tag nrho cov txheej thaum ub hom ntawm JavaScript- tus lej, hlua thiab boolean.

Ib yam li ntawd, hom twg raug muab rau cov hloov pauv nrog hom null hauv TypeScript Mcq?

Yog a sib txawv tshaj tawm nrog cov ntaub ntawv yam ces peb ua tau muab ib yam yam tus nqi rau ntawd sib txawv.

Cov ntaub ntawv hom hauv TypeScript.

Built-in Cov Ntaub Ntawv lo lus tseem ceeb Nqe lus piav qhia
Tsis muaj tsis muaj Nws yog siv thaum ib yam khoom tsis muaj nqi
Tsis tau txhais tsis tau txhais Denotes tus nqi muab rau uninitialized variable

5 hom ntaub ntawv yog dab tsi?

Hom ntaub ntawv nquag muaj xws li:

  • Integer.
  • Floating point tooj.
  • Cim.
  • Txoj hlua
  • Boolean.

Pom zoo: