Skip to content

Instantly share code, notes, and snippets.

View iammateus's full-sized avatar
🎯
Focusing

Mateus Soares iammateus

🎯
Focusing
View GitHub Profile
@iammateus
iammateus / genArr.js
Created July 11, 2022 14:21
JS: generate random integer array of random size
function getRandomIntInclusive(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min + 1) + min); //The maximum is inclusive and the minimum is inclusive
}
const genArr = () => {
const arr = [];
for(let i = 0; i < getRandomIntInclusive(0, 100); i++){
arr.push(getRandomIntInclusive(0, 100))
openapi: 3.0.0
info:
title: Mateus API
description: A simple API with one route
version: 1.0.0
paths:
/hello:
get:
summary: Get a friendly greeting
description: Returns a simple greeting message