Skip to content

Instantly share code, notes, and snippets.

@jdanyow
Created February 17, 2021 21:46
Show Gist options
  • Select an option

  • Save jdanyow/19a16bd6655ab4f09a65e8a551d8ef7d to your computer and use it in GitHub Desktop.

Select an option

Save jdanyow/19a16bd6655ab4f09a65e8a551d8ef7d to your computer and use it in GitHub Desktop.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GistRun</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>Hello world!</h1>
<script>
const calls = [];
function html(args) {
calls.push(args);
}
const greeting = name => html`hi ${name}`;
greeting('jeremy');
greeting('rob');
console.log(calls[0].raw === calls[1].raw); // true
</script>
</body>
</html>
console.log('Hello World!');
/* todo: add styles */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment