Skip to content

Commit

Permalink
learning exports in javascript
Browse files Browse the repository at this point in the history
  • Loading branch information
jessrbl committed Mar 24, 2024
1 parent 3b0bbfc commit ef3c6dc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
16 changes: 0 additions & 16 deletions funcoes.js

This file was deleted.

3 changes: 3 additions & 0 deletions node/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const mod1 = require('./mod1')

console.log(mod1.falaNome())
9 changes: 9 additions & 0 deletions node/mod1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const nome = 'Jéssica'
const sobrenome = 'Fernanda Rebelo'

const falaNome = () => nome + ' ' + sobrenome

exports.nome = nome
exports.sobrenome = sobrenome
exports.falaNome = falaNome

0 comments on commit ef3c6dc

Please sign in to comment.