This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const lottery = (amount = 15, maximumNumber = 25) => { | |
const numbersDrawn = [] | |
let amoutNumbersDrawn = 0 | |
const raffle = { | |
getRandomNumber : (max) => { | |
return (Math.floor(Math.random() * max) + 1) | |
}, | |
checkRepeatedNumber : (number) => { | |
const alreadyDrawn = numbersDrawn.find(findNumber => findNumber === number) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ls = window.localStorage; | |
var array_ls = []; | |
for(x in ls){ | |
array_ls.push(x); | |
console.log(x); | |
} | |
for(i=0;i<6;i++){ | |
array_ls.pop(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Forçando navagador a usar o https | |
console.log(window.location.href); | |
var protocol = window.location.href; | |
if (protocol.match(/http:/)){ | |
var newUrl = protocol.replace("http://","https://"); | |
window.location = newUrl; | |
}else{ | |
console.log('Protocolo seguro'); | |
} |
NewerOlder