Skip to content

Instantly share code, notes, and snippets.

@schmidtfx
schmidtfx / func.js
Last active January 25, 2021 10:54
// Let's define an original function
const my_func = (param1, param2) => {
};
const result = my_func(1, 2);
// Ohh, I want to update my orginal function with additional fields, but won't break backwards compatibility
const my_func = (param1, param2, {onClick} = {}) => {
<html>
<head>
<title>Hallo</title>
</head>
<body>
<h1>This is a first test</h1>
</body>
</html>