Skip to content

Instantly share code, notes, and snippets.

Avatar

Joshy joshycube

View GitHub Profile
@joshycube
joshycube / Swap data ugly version
Last active Jul 27, 2020
Swap data ugly version
View Swap data ugly version
const input = [
{ symbol: "ZCS", secondary: "PCE", amount: 10 },
{ symbol: "ABC", secondary: "BCE", amount: 20 },
{ symbol: "XCF", secondary: "ZBD", amount: 20 },
{ symbol: "VBN", amount: 30 },
{ symbol: "ACM", amount: 20 },
];
function mapOnly(data) {
const output = [];
@joshycube
joshycube / index.html
Created Mar 23, 2018
Coding Challenge JS Developer Code Challenge // source https://jsbin.com/pafafek
View index.html
<html>
<head>
<meta name="description" content="JS Developer Code Challenge" /><html>
<head>
<script src="https://cdn.rawgit.com/lodash/lodash/4.5.1/dist/lodash.min.js"></script>
<script src="https://cdn.rawgit.com/lodash/lodash/4.5.1/dist/lodash.fp.min.js"></script>
<title>Coding Challenge</title>
</head>
<body>
<h1>Terms of the Exercise</h1>
@joshycube
joshycube / date-day.js
Created Sep 30, 2016
Date object's default day
View date-day.js
function createDateString(day, month, year) {
return year + '-' + month + '-' + day;
}
function validateDate(dateStr) {
var ourDate = new Date(dateStr);
if(/(Invalid)/.test(ourDate)) {
return false;
}
return true;
View index.html
<style id="jsbin-css">
.slider li{ display: none; }
.active-slide { display: inline!important; }
</style>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<!-- slider 1 -->
<div class="slider-item-one">
<ul class="slider">
<li class="active-slide">content 1</li>
You can’t perform that action at this time.