Skip to content

This package demonstrates a simple module example. The sample module contains an exported constant, function, and a class.

Notifications You must be signed in to change notification settings

coderDx/coderdx-es-module-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ES Module Example

This package demonstrates a simple module example. The sample module contains an exported constant, function, and a class.

Instructions

  1. On your local machine, create a new directory.
  2. cd to your new directory.
  3. Run npm init to create a package.json file.
  4. Add this package using npm -i or yarn add.
  5. Create a new index.js file.
  6. Add this code:
import { coolNum, hello, dx  } from 'coderdx-es-module-example'

console.log('Way cool num: ', coolNum)

hello()

const importedClass = new dx

importedClass.printDay()
  1. In your shell run
    node index.js
  2. In your terminal you should see
$ node index.js
Way cool num:  42
Hello!
The day today is:  29
$

About

This package demonstrates a simple module example. The sample module contains an exported constant, function, and a class.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published