Skip to content

Instantly share code, notes, and snippets.

View joshycube's full-sized avatar

Joshy joshycube

View GitHub Profile
<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>
@joshycube
joshycube / date-day.js
Created September 30, 2016 15:48
Date object's default day
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;
@joshycube
joshycube / index.html
Created March 23, 2018 11:48
Coding Challenge JS Developer Code Challenge // source https://jsbin.com/pafafek
<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 / Swap data ugly version
Last active July 27, 2020 23:03
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 = [];