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
class Helper { | |
static getHelloWorldSync = () => { | |
return "Hello World Sync" | |
} | |
static getHelloWorldAsync = async () => { | |
return "Hello World Async" | |
} | |
} | |
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
class ListLigada{ | |
obj = { | |
anterior: null, | |
proximo: null, | |
valor: null | |
} | |
calda = null | |
cabeca = null | |
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
module.exports = (params) => { | |
const app = { | |
print: async () => { | |
console.log(params) | |
} | |
} | |
return app | |
} |
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
class ListLigada{ | |
obj = { | |
anterior: null, | |
proximo: null, | |
valor: null | |
} | |
calda = null | |
cabeca = null | |
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
/* | |
Compilar: gcc -o copy copy.c | |
Executar: ./copy | |
*/ | |
#import <stdio.h> | |
void naoAlteraValor(int x){ | |
x=0; | |
} |
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
/* | |
Compilar: gcc -o array array.c | |
Executar: ./array | |
*/ | |
#include <stdio.h> | |
void preencheArray(int* array){ | |
for(int i=0;i<5;i++){ | |
array[i] = i+1; | |
} |
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
/* | |
Compilar: gcc -o hello hello.c | |
Executar: ./hello | |
*/ | |
#include <stdio.h> | |
int main() { | |
printf("Hello World\n"); | |
return 0; | |
} |
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 {funcao1,funcao2,funcao3} = require('./modules') | |
exports.test = test = async () => { | |
await funcao1() | |
await funcao2() | |
await funcao3() | |
} | |
(async ()=>{ test() })() //chama test |
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 {hello,espaco,world,helloworld} = require('./modulos') | |
const test = () => { | |
console.log(`${hello()}${espaco()}${world()}`) | |
console.log(`${helloworld()}`) | |
} | |
(async ()=>{test()})() |
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
class Abstrata { | |
print = () => { | |
throw "método abstrato precisa de implementação" | |
} | |
} | |
class Concreta1 extends Abstrata { | |
print = () => { | |
console.log('Classe concreta1 que estende classe abstrata') | |
} |