``` | |
<nav aria-label="Main menu"> | |
<!-- items --> | |
</nav> | |
``` |
- Format a valid string or number to any currency.
const formatAsMoney = (amount, locale = "en-NG", currency = "NGN") => {
return new Intl.NumberFormat(locale, {
style: "currency",
currency,
}).format(amount);
};
{"version":1,"resource":"file:///Users/erons/Documents/work/Luxor/lmf-v5/apps/brokerage/pages/api/hosting/index.ts","entries":[{"id":"WBqJ.ts","timestamp":1649371599924},{"id":"ThMd.ts","timestamp":1649371626951},{"id":"Tem9.ts","timestamp":1649371658197},{"id":"LBmY.ts","source":"undoRedo.source","timestamp":1649371659569},{"id":"IZmb.ts","timestamp":1649371664000},{"id":"2cea.ts","timestamp":1649371746080},{"id":"WWhs.ts","timestamp":1649371805860},{"id":"Uynv.ts","timestamp":1649371825719},{"id":"byFX.ts","timestamp":1649371858598}]} |
-
Values come in two forms in JavaScript. primitive and object. Primitives include: strings, boolean, numbers(another variation to this is bigint: big-integer which is used for storing arbitrarily large numbers), null, undefined and symbol. Object values are: Arrays and Objects. It's important to note that functions in JS are a special type of object.
-
The best semantic use of
const
is when you have a simple primitive value that you want to to give a useful name to, such as usingmyBirthday
instead oftrue
. This makes programs easier to read. -
Other ways variables can be declared are in function parameters and in catch clauses. The former behave
var
-ish while the latter behavesconst
andlet
-ish -
Function declarations are so named because they appear as statements by themselves. Not as expressions in another statement. For this reason, they can be hoisted in contrast to function expressions which are usually defined and assigned to variable names. It is important to n
-
Values come in two forms in JavaScript. primitive and object. Primitives include: strings, boolean, numbers(another variation to this is bigint: big-integer which is used for storing arbitrarily large numbers), null, undefined and symbol. Object values are: Arrays and Objects. It's important to note that functions in JS are a special type of object.
-
The best semantic use of
const
is when you have a simple primitive value that you want to to give a useful name to, such as usingmyBirthday
instead oftrue
. This makes programs easier to read. -
Other ways variables can be declared are in function parameters and in catch clauses. The former behave
var
-ish while the latter behavesconst
andlet
-ish -
Function declarations are so named because they appear as statements by themselves. Not as expressions in another statement. For this reason, they can be hoisted in contrast to function expressions which are usually defined and assigned to v
- To create a link that triggers a download, do the following
<a href="/files/file.pdf" download>Download PDF</a>
- If your link contains just an icon or emoji, use aria-label or a
visually-hidden
class like the following
<a href="/">
<!-- Hide the icon from assistive technology -->
<picture> | |
<source srcset="./img/pie.jpg" media="{min-width: 700px}" /> | |
<source srcset="./img/pie-400.jpg" media="{min-width: 400px}" /> | |
<img src="./img/pie.jpg" /> | |
</picture> |
// Construct Single Node | |
class Node { | |
constructor(data, next = null) { | |
this.data = data; | |
this.next = next; | |
} | |
} | |
// Create/Get/Remove Nodes From Linked List | |
class LinkedList { |