Warning: file_put_contents(aCache/aDaily/post/brogrammist/--): Failed to open stream: No space left on device in /var/www/tgoop/post.php on line 50
Brogrammist@brogrammist P.38
BROGRAMMIST Telegram 38
JavaScript'da `void` operatori

void o'zidan keyin keladigan ifoda qiymatini `undefined`ga aylantirib yuboradi:

void 0 === undefined; // true
void 1 === undefined; // true
void 'Hello' === undefined; // true

Yuqoridagi misollardan ko'rinib turibdiki "void" qilingan ifoda qiymati undefined'ga teng.

Agar biror funksiya "return" qiladigan qiymat kerak bo'lmasa, uning oldiga void qo'yish yaxshi amaliyot (ya'ni best practice) hisoblanadi:

button.onclick = () => void doSomething();


Qiziq fakt: Ba'zi minifikatorlar undefined uzun so'z bo'lgani uchun uni void 0 bilan almashtirib ketadi.

#js #jsdaily #tips
👍23



tgoop.com/brogrammist/38
Create:
Last Update:

JavaScript'da `void` operatori

void o'zidan keyin keladigan ifoda qiymatini `undefined`ga aylantirib yuboradi:


void 0 === undefined; // true
void 1 === undefined; // true
void 'Hello' === undefined; // true

Yuqoridagi misollardan ko'rinib turibdiki "void" qilingan ifoda qiymati undefined'ga teng.

Agar biror funksiya "return" qiladigan qiymat kerak bo'lmasa, uning oldiga void qo'yish yaxshi amaliyot (ya'ni best practice) hisoblanadi:

button.onclick = () => void doSomething();


Qiziq fakt: Ba'zi minifikatorlar undefined uzun so'z bo'lgani uchun uni void 0 bilan almashtirib ketadi.

#js #jsdaily #tips

BY Brogrammist


Share with your friend now:
tgoop.com/brogrammist/38

View MORE
Open in Telegram


Telegram News

Date: |

Add the logo from your device. Adjust the visible area of your image. Congratulations! Now your Telegram channel has a face Click “Save”.! bank east asia october 20 kowloon Telegram desktop app: In the upper left corner, click the Menu icon (the one with three lines). Select “New Channel” from the drop-down menu. A new window will come up. Enter your channel name and bio. (See the character limits above.) Click “Create.” The channel also called on people to turn out for illegal assemblies and listed the things that participants should bring along with them, showing prior planning was in the works for riots. The messages also incited people to hurl toxic gas bombs at police and MTR stations, he added.
from us


Telegram Brogrammist
FROM American