Skip to content

Instantly share code, notes, and snippets.

View kidandcat's full-sized avatar
☀️
Looking for the place of sunrise

Hairok kidandcat

☀️
Looking for the place of sunrise
View GitHub Profile
@kidandcat
kidandcat / main.go
Created October 27, 2020 10:15 — forked from guinso/main.go
Sample SMTP with attachment
package main
import (
"crypto/tls"
"encoding/base64"
"fmt"
"io/ioutil"
"log"
"net/smtp"
"strings"
const myMembers = data.results[0].members;
let fieldsInserted = ["first_name", "party", "state", "seniority", "votes_with_party_pct"];
let tBody = document.getElementById("houseData");
let link = ["url"]; //he creado otra variable con el atributo ''url'' que se encuentra en el JS, pero no se en que momento colocarlo ni que poner.
for (let i=0; i< myMembers.length; i++) {
let newTr = document.createElement("tr");
for (let j=0; j< fieldsInserted.length; j++) {
let dataInserted = fieldsInserted[j];
let newTd = document.createElement("td");
newTd.innerHTML = myMembers[i][dataInserted]