JavaScript ഫങ്ക്ഷനുകൾ, ത്രെഡുകൾ, എക്സിക്യൂഷൻ

JavaScript അടിസ്ഥാനതത്വങ്ങൾ മനസ്സിലാക്കുന്നത് മികച്ച കോഡ് എഴുതാൻ നിങ്ങളെ സഹായിക്കും. ഫങ്ക്ഷനുകൾ, പ്രോസസ്സുകൾ, ത്രെഡുകൾ, എക്സിക്യൂഷൻ രീതികൾ എന്നിവയുടെ ഒരു വിശദീകരണം താഴെ നൽകുന്നു.

5 തരം JavaScript ഫങ്ക്ഷനുകൾ

Process vs. Thread

ഒരു പ്രോസസ് (Process) എന്നത് നിങ്ങളുടെ കമ്പ്യൂട്ടറിൽ പ്രവർത്തിക്കുന്ന ഒരു പ്രോഗ്രാം ആണ്.

ഒരു പ്രോസസിനുള്ളിലെ ചെറിയൊരു യൂണിറ്റാണ് ത്രെഡ് (Thread).

Synchronous vs. Asynchronous

JavaScript ഒരു single-threaded ആണ്. അതായത്, ഇത് ഒരേസമയം ഒരു ടാസ്ക് മാത്രമേ കൈകാര്യം ചെയ്യുകയുള്ളൂ.

Synchronous Execution:

Asynchronous Execution:

Source: https://dev.to/kamalesh_ar_6252544786997/types-of-function-and-threads-process-and-synchronous-vs-asynchronous-in-javascript-1hhd