Skip to content

Instantly share code, notes, and snippets.

@faustoct1
Last active July 11, 2022 16:16
Show Gist options
  • Save faustoct1/2498b6cda976573c72026125aa42d821 to your computer and use it in GitHub Desktop.
Save faustoct1/2498b6cda976573c72026125aa42d821 to your computer and use it in GitHub Desktop.
Funções helpers em javascript em 5 segundos
export const soma = (x,y) => {
return x+y
}
export const multiplica = (x,y)=>{
return x*y
}
export const subtrai = (x,y)=>{
return x-y
}
export const divide = (x,y)=>{
return x/y
}
export const log = (x,y)=>{
return console.log(x,y)
}
export const a = (x,y)=>{
return alert(`${x} ${y}`)
}
const {soma,multiplica,subtrai,divide,log} = require('./funcs')
log(soma(2,1))
log(multiplica(2,3))
log(subtrai(3,3))
log(divide(10,2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment