Skip to content

Instantly share code, notes, and snippets.

View gabizinha12's full-sized avatar
🖥️
creating bugs

Gabrielle Lima gabizinha12

🖥️
creating bugs
  • São Paulo
  • 08:21 (UTC -03:00)
View GitHub Profile
function caixaEletronico() {
let saque = document.getElementById("saque").value;
let notasTotal = [2, 5, 10, 20, 50, 100, 200];
var result = "<br>Quantidade de notas" + "<br>";
let ident = false;
for (i = 0; i < notasTotal.length; i++) {
if (saque <= 1000 && saque % 2 == 0) {
if (saque >= notasTotal[i]) {
result =
function somaDeGauss(numeroMaximo) {
const array = new Array(numeroMaximo).fill(0)
let soma = 0
array.map((value, index) => {
soma += (index + 1)
})
console.log(soma)
}
const letrar = (frase, letra) => {
let quantidade = 0
for(let i = 0; i < frase.length; i++ ) {
if(frase[i] === letra) quantidade += 1
}
console.log(quantidade)
}
const nome = "Gabizinha";
nome = "Pereira"
// const não se pode alterar
let nome = "Victor" // global, local, bloco
// somente dentro do bloco
var sobrenome = "Lima" // vazamento de escopo // global, local
// pode ser usada fora do bloco
function paginatedResults(model) {
return async (req, res, next) => {
const page = parseInt(req.query.page)
const limit = parseInt(req.query.limit)
const startIndex = (page - 1) * limit
const endIndex = page * limit
const results = {}
import React, {Component, useEffect, useState} from 'react'
import './Main.css'
function Main() {
const [error, setError] = useState(null);
const [isLoaded, setIsLoaded] = useState(false);
const [people, setPeople] = useState([]);
// Nota: O array [] deps vazio significa
// este useEffect será executado uma vez
// semelhante ao componentDidMount()
const res = document.getElementById("res");
function analisar() {
let peso = parseFloat(document.getElementById("inputPeso").value);
let altura = parseFloat(document.getElementById("inputAltura").value);
const imc = (peso / altura * altura);
res.innerHTML = ''
if (imc < 18.5) {
res.innerHTML += `Abaixo do peso`;
@gabizinha12
gabizinha12 / gist:4d7abe6fad5fcc69f29753db977551fb
Created October 15, 2020 17:15 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
<div class="container">
<h1>Editar carrinho</h1>
<form action="/usuarios/carrinho/edit" method="post">
<input type="hidden" name="id" value="{{produto._id}}">
<label for="nome">Nome:</label>
<input type="text" id="nome" name="nome" placeholder="Nome do produto" value="{{produto.nome}}">
<label for="descricao">Descrição:</label>
<textarea id="descricao" name="descricao" placeholder="Descrição do produto" cols="30" rows="5"></textarea>
<label>Imagem do Produto</label>
.container {
display: flex;
flex-direction: column;
align-items: center;
}