Skip to content

testeeee #144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ecma/function-area-of-circle/iago.vital/area-cIrcle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
let raio = 10;

const area = require('./function-circle.js');

area(raio);
9 changes: 9 additions & 0 deletions ecma/function-area-of-circle/iago.vital/function-circle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const pi = Math.PI;


function area(a){
let total = ((a**2)*pi);
console.log(total);
};

module.exports = area;
9 changes: 9 additions & 0 deletions ecma/function-calc/iago.vital/calc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const calculadora = require("./function-calc.js");

console.log(calculadora(1,1,"+"));

console.log(calculadora(5,2,"-"));

console.log(calculadora(3,4,"*"));

console.log(calculadora(4,2,"/"));
14 changes: 14 additions & 0 deletions ecma/function-calc/iago.vital/function-calc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
function calculadora (a,b,c){
switch(c){
case "+":
return parseInt(a) + parseInt(b);
case "-":
return a - b;
case "*":
return a * b;
case "/":
return a / b;
}
}

module.exports = calculadora;
21 changes: 21 additions & 0 deletions web/node-hello-lang/iago.vital/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const http = require("http");
const url = require("url");

const hostname = "127.0.0.1";
const port = 10000;

const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader("Content-Type", "text/plain: charset = utf-8");

const hello = {
"/pt": "Olá mundo!",
"/en": "Hello world!"
};

res.end(hello[req.url]);
});

server.listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/`);
});
14 changes: 14 additions & 0 deletions web/node-hello-simple/iago.vital/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const http = require("http");

const hostname = "127.0.0.1";
const port = 10000;

const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader("Content-Type", "text/plain");
res.end("Hello World");
});

server.listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/`);
});