Skip to content

Instantly share code, notes, and snippets.

View ctj01's full-sized avatar

Cristian Mendoza ctj01

View GitHub Profile
@ctj01
ctj01 / promises.js
Last active January 21, 2021 13:56
const isYourFriendHappy = true;
const willGoingHisHome = new Promise((resolve, reject) => {
if(isYourFriendHappy)
{
const goodDay = {
games: 'enjoy good food'
}
public class Chef
{
/// <summary>
/// doing dependency injection in the constructor
/// </summary>
private readonly IFood food;
public Chef(IFood food)
{
this.food = food;
}
public class Omelette : IFood
{
public void Prepare()
{
Console.WriteLine("im preparing a Omelette");
}
}
public class Scrambled_eggs : IFood
{
public void Prepare()
{
Console.WriteLine("i'm preparing a Scrambled eggs");
}
}
public interface IFood
{
void Prepare();
}
}
public class example
{
public void test(){
System.Console.WriteLine("i'm the first example");
}
}
public class example_two{
private readonly example e;
public class example
{
public void test(){
System.Console.WriteLine("i'm the firt example");
}
}
public class example_two{
private readonly example e;
public example_two()