To create a function in Python, we can use the def
keyword followed by the function name and parameters enclosed in parenthesis. The code block inside the function is indented.
main.py86 chars5 lines
In JavaScript, we can declare a function using the function
keyword followed by the function name and parameters enclosed in parenthesis. The code block inside the function is enclosed in curly braces.
index.tsx103 chars6 lines
We can also create an arrow function in JavaScript using the =>
operator.
index.tsx106 chars6 lines
I hope this helps you!
gistlibby LogSnag