Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export function sum (a, b) {
- return a + b
- }
- 'use strict'
- import sum from 'functions'
- let a = 10
- let b = 5
- console.log(sum(a, b))
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>ES6 Getting Started</title>
- <meta name="description" content="An example of how to use ES6">
- </head>
- <body>
- <p>
- View the console
- </p>
- <script src="dist/main.js">
- </script>
- </body>
- </html>
- {
- "name": "my-project",
- "version": "1.0.0",
- "scripts": {
- "build": "babel src -d dist"
- },
- "devDependencies": {
- "babel-cli": "^6.4.5"
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement