Skip to content

Instantly share code, notes, and snippets.

View JakeDuke's full-sized avatar

Jake Dukin JakeDuke

  • Prague
View GitHub Profile
let controller = {
axios: {},
newArtist: function (artist) {
this.axios.post('/create', {
newArtist: artist
})
.then((responce) => {
console.log(responce.data);
})
.catch((error) => {
var nestedObject = {
speakers: [{name:"Elie"},{name:"Tim"},{name:"Matt"}],
data: {
continents: {
europe: {
countries: {
switzerland: {
capital: "Bern",
population: 8000000
}
var app = {
db: {},
next_id: 0,
create: function(newThing) {
if(newThing !== ''){
this.db[this.next_id] = newThing;
this.next_id ++;
return 'NEW OBJECT WAS CREATED' ;
}else{
var calc = {
lastResult: null,
add: function (arg1, arg2) {
return arg1 + arg2;
},
substract: function (arg1, arg2) {
function tripledouble(num1, num2) {
var check1 = '';
var check2 = '';
if (typeof num1 !== 'number' || typeof num2 !== 'number'){
return 0;
}
var a = num1.toString().split('');
var b = num2.toString().split('');
for (var i = 0; i < a.length; i++){