Skip to content

Instantly share code, notes, and snippets.

View DvdQzd's full-sized avatar
🏠
Working from home

David Quezada DvdQzd

🏠
Working from home
  • SoftServe
  • Valparaíso, Chile.
View GitHub Profile
@DvdQzd
DvdQzd / fizzBuzz.js
Created March 6, 2021 20:52
LeetCode FizzBuzz Solution explained
var fizzBuzz = function(n) {
// Start by creating an empty list to store our result
var result = []
// Then we iterate from 1 to the number input
for (let i = 1; i <= n; i++) {
/**
* This output variable is where we are
* storing either Fizz, Buzz or the number
* we are currently iterating.
*
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Pokemon;
class PokemonController extends Controller
{
/**
<?php
use Illuminate\Http\Request;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class PokemonController extends Controller
{
/**
* Display a listing of the resource.
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Pokemon extends Model
{
protected $fillable = ['name'];
}
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTablePokemons extends Migration
{
/**
* Run the migrations.