What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-22 00:26:02
google drive show size folder
"MOSTRAR TAMANHO DAS PASTAS DO GOOGLE DRIVE/SHOW SIZE FOLDER IN GOOGLE DRIVE"; //Source: https://www.alphr.com/get-folder-size-google-drive-folders/ //Acesse: https://script.google.com/macros/s/AKfycbyUvNoXzBMBDE9pnHkLUltliGwjip5x09t3PeTY_1KoX... Add solution -
Javascript 2021-09-21 21:50:02
Working with TOML in JavaScript
/* This code comes from Vincent Lab And it has a video version linked here: https://www.youtube.com/watch?v=kdZN9IOfyeE */ // Import dependencies const fs = require("fs"); const toml = require("toml"); // Read a toml file con... Add solution -
Javascript 2021-09-21 12:20:03
localstorage save array
//storing array in localStorage var colors = ["red","blue","green"]; localStorage.setItem("my_colors", JSON.stringify(colors)); //store colors var storedColors = JSON.parse(localStorage.getItem("my_colors&qu... Add solution -
Javascript 2021-09-21 00:29:02
set and get array inside cookie in javascript
JSON encode it, effectively producing a string like "{name:'myname',age:'myage'}" which you put in a cookie, retrieve when needed and decode back into a JavaScript array/object. Example - store array in a cookie: ------------------------------... Add solution -
Javascript 2021-09-20 13:01:05
fetch in javascript
//Obj of data to send in future like a dummyDb const data = { username: 'example' }; //POST request with body equal on data in JSON format fetch('https://example.com/profile', { method: 'POST', headers: { 'Content-Type': 'application/json', }, ... Add solution -
Javascript 2021-09-19 05:30:02
save json data in google drive
function saveAsJSON() { var blob,file,fileSets,obj; obj = {//Object literal for testing purposes key:"value" } /** * Creates a file in the users Google Drive */ fileSets = { title: 'AAA_Test.json', mimeType: 'application... Add solution -
Javascript 2021-09-18 17:40:02
clone javascript object
var student = {name: "Rahul", age: "16", hobby: "football"}; //using ES6 var studentCopy1 = Object.assign({}, student); //using spread syntax var studentCopy2 = {...student}; //Fast cloning with data loss var studentCopy3 =... Add solution -
Javascript 2021-09-18 10:25:06
vanilla js post form data
document.addEventListener('submit', function (event) { event.preventDefault(); fetch('https://jsonplaceholder.typicode.com/posts', { method: 'POST', body: JSON.stringify(Object.fromEntries(new FormData(event.target))), headers: { 'Content-typ... Add solution