0% found this document useful (0 votes)
19 views1 page

JavaScript Terminology Explained

Uploaded by

uzair.feeroze
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views1 page

JavaScript Terminology Explained

Uploaded by

uzair.feeroze
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

JavaScript Glossary

Syntax/Function Purpose Example Best Practice

let/const Declare variables (block-scoped).


let x = 5; const y = 10; Use const by default unless rea

if/else Control flow based on conditions.


if (x > 5) { [Link]('x is large');
Use } strict comparison (===) to a

for loop Iterate over arrays or ranges. for (let i = 0; i < [Link]; i++) { Use
[Link](arr[i]);
modern iteration } methods l

Arrow Functions Define concise functions. const add = (a, b) => a + b; Avoid using arrow functions for

[Link]() Add an element to the end of [Link](10);


array. Avoid mutating arrays in functio

try/catch Handle errors gracefully. try { riskyOperation(); } catch (e)Log


{ [Link](e);
errors for debugging
} and pr

fetch() Make HTTP requests. fetch('[Link]


Use async/await
=> [Link]());
for better reada

this Refers to the current context. function sayHi() { [Link]([Link]);


Understand
} binding to avoid con

Destructuring Extract values from arrays/objects.


const {name} = user; Use for clean and readable cod

You might also like