This file contains hidden or 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
function parseJwt (token) { | |
var base64Url = token.split('.')[1]; | |
var base64 = base64Url.replace('-', '+').replace('_', '/'); | |
return JSON.parse(window.atob(base64)); | |
}; |
This file contains hidden or 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 data =[ | |
{ | |
"codigo": "11752.0", | |
"descripcion": "Fallecimiento", | |
"monto": "11,819.59", | |
"moneda": { | |
"codigo": "Dolar", | |
"simbolo": "US$", | |
"descripcion": "Dólares" | |
} |
This file contains hidden or 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
onkeypress="return ((event.charCode >= 65 && event.charCode <= 90) || (event.charCode >= 97 && event.charCode <= 122))" |
This file contains hidden or 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
<?php | |
if (!defined('BASEPATH')) | |
exit('No direct script access allowed'); | |
class Estrategia_comercial extends MY_Controller | |
{ | |
function __construct() | |
{ | |
parent::__construct(); |
This file contains hidden or 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
function pagoInvitacion(name){ | |
var nombres = ["Jhon", "Susu"]; | |
var determinarPago = nombres[Math.floor(Math.random() * nombres.length)] | |
return determinarPago; | |
} | |
var pago = pagoInvitacion(); | |
console.log(pago) |
This file contains hidden or 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
function whosPaying(names) { | |
var names = ["Angela", "Ben", "Jenny", "Michael", "Chloe", "Jhon"]; | |
var randomItem = names[Math.floor(Math.random() * names.length)]; | |
return randomItem | |
} |
This file contains hidden or 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
// Adding element and agree FizzBazz | |
var output = []; | |
var count = 1; | |
function fizzbuzz(){ | |
while(count <= 15){ | |
if(count % 3 === 0 && count % 5 === 0 ){ | |
output.push("FizzBazz"); |
This file contains hidden or 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 n = Math.random(); | |
n = n * 6; | |
var num = Math.floor(n); | |
if (num >= 6){ | |
console.log(num + " Estamos alejando"); | |
} |
This file contains hidden or 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 obrero = Object.assign({nombre: 'Juan'}, comer, caminar, taladrar) | |
const masajista = Object.assign({nombre: 'Juana'}, comer, caminar, masajear) | |
masajista.masajear() //'Estoy masajeando' | |
obrero.taladrar() // 'estoy taladrando' | |
masajista.comer('Ensalada') // 'Estoy comiendo Ensalada' | |
obrero.comer('Carne') // Estoy comiendo Carne |
This file contains hidden or 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
function getMilk(money, costPerBottle) { | |
console.log("move to store to buy milk"); | |
// var numberOfBOttles = Math.floor(money / 1.5); | |
// console.log("buy " + numberOfBOttles + " bottles of milk"); | |
console.log("buy " + calcBottles(money, costPerBottle) + " bottles of milk"); | |
console.log("go back to home"); |
NewerOlder