Skip to content

Instantly share code, notes, and snippets.

@kauffmanes
Created March 7, 2023 19:10
Show Gist options
  • Save kauffmanes/dcc3609a680da317f781d67b2d6c36d7 to your computer and use it in GitHub Desktop.
Save kauffmanes/dcc3609a680da317f781d67b2d6c36d7 to your computer and use it in GitHub Desktop.
Stack Overflow Answer
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <h1>Hello</h1>
  <p>This is a test.</p>
  <script src="./src/main.js" defer type="module"></script>
  <script src="./src/module.js" type="module"></script>
</body>
</html>
// src/main.js
import checkCashRegister from "./module.js";
checkCashRegister("price", "cash", "cid");
// src/module.js
const checkCashRegister = (price, cash, cid) => {
  console.log(price, cash, cid);
};
export default checkCashRegister;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment