Github
Back to blog

Functions for Beginners

This is a blog post about functions.

We'll learn what functions are, how to write functions, and how to use them.

this is a paragraph

This is a Markdown sub-heading h1

This is a Markdown sub-heading h2

This is a Markdown sub-heading h3

This is a Markdown sub-heading h4

This is a Markdown sub-heading h5
This is a Markdown sub-heading h6
  • This is a list
  • List item
    • Cooool
  1. First item

Other stuff

Emphasis

MDX

alt

const doSomething = () => {
return console.log('hey')
}

npm install @stitches/react

Check this

import { createStitches } from '@stitches/react';
export const { styled, getCssText } = createStitches({
theme: {
fonts: {
system: 'system-ui',
},
colors: {
hiContrast: 'hsl(206,10%,5%)',
loContrast: 'white',
},
fontSizes: {
1: '13px',
2: '15px',
3: '17px',
},
},
});

function Clock(props) {
const [date, setDate] = useState(new Date());
useEffect(() => {
var timerID = setInterval(() => tick(), 1000);
return function cleanup() {
clearInterval(timerID);
};
});
function tick() {
setDate(new Date());
}
return (
<div>
<h2>It is {date.toLocaleTimeString()}.</h2>
</div>
);
}