Skip to content

Instantly share code, notes, and snippets.

Martins Alexandre MartinsAlexandre

Block or report user

Report or block MartinsAlexandre

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@MartinsAlexandre
MartinsAlexandre / cowsay
Last active Apr 17, 2018
quete node cowsay
View cowsay
var cowsay = require("cowsay");
console.log(cowsay.say({
text : "hello boy",
e : "oO",
T : "U "
}));
// or cowsay.think()
View node quete 1
process.stdin.resume()
process.stdin.setEncoding('utf8')
console.log('What\'s your age ? ')
process.stdin.on('data', (number) => {
if (!isNaN(number) && number < 99) {
calcul(number);
}
function calcul(number) {
View challenge.js
class Monster {
constructor(options = {}){
this.health = 100;
this.name = options.name;
}
soigner () {
this.health = this.health + 10;
return this.health;
View challenge.js
const address = {
city: "Lyon",
state: "FR",
zip: 69001
};
const sportList = ['Football', 'BasketBall']
const ortherSportList = ['Boxe', 'Judo']
View challenge.js
const address = {
city: "Lyon",
state: "FR",
zip: 69001
};
const sportList = ['Football', 'BasketBall']
const ortherSportList = ['Boxe', 'Judo']
View noe.ts
class Animal {
}
class Chat extends Animal {
quatreP: boolean;
}
class Chien extends Animal {
quatreP: boolean;
}
@MartinsAlexandre
MartinsAlexandre / challenge.ts
Last active Mar 12, 2018
challenge typeScript 1
View challenge.ts
function hello(name : string) {
console.log("Hello " + name);
}
let firstName = "bob";
hello(firstName);
hello(firstName + " marley");
View es6part2.html
<script>
const profile = {
name: 'Alex',
getName() {
return this.name;
}
};
console.log(profile.getName());
</script>
View form.js
function requestApi (){
var api = "http://api.openweathermap.org/data/2.5/weather?q=";
var apiKey = "&APPID=5dbe8aa12a4dde7bbc49a832b7e2d5f7";
var units = "&units=metric";
var eltCity = document.getElementById("city");
var input = eltCity.value;
var url = api + input + apiKey + units;
View es6part1.html
<script>
let city = "La Loupe, ou pas !";
let age = "26";
const dateOfBirth = "03/08/1991";
let sentence = `J'habite à ${city}, j'ai ${age} ans, et je suis né le ${dateOfBirth}`
console.log(sentence);
</script>
You can’t perform that action at this time.