Last active
July 11, 2022 16:16
-
-
Save faustoct1/2498b6cda976573c72026125aa42d821 to your computer and use it in GitHub Desktop.
Funções helpers em javascript em 5 segundos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}`) | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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