Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
JS Bin // source https://jsbin.com/haxizaj
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="https://cdn.jsdelivr.net/momentjs/2.14.1/moment-with-locales.min.js"></script>
<script src="https://cdn.jsdelivr.net/lodash/4/lodash.min.js"></script>
</head>
<body>
<script id="jsbin-javascript">
"use strict";
console.clear();
var obj = { a: 1, b: 2 };
var Cypress = {};
Cypress._ = _;
Cypress.moment = moment;
console.log(_.get(obj, "a"));
console.log(Cypress.moment().format("DD/MM/YYYY"));
</script>
<script id="jsbin-source-javascript" type="text/javascript">console.clear();
const obj = {a: 1, b: 2};
const Cypress = {};
Cypress._ = _;
Cypress.moment = moment;
console.log(_.get(obj, "a"));
console.log(Cypress.moment().format("DD/MM/YYYY"));</script></body>
</html>
"use strict";
console.clear();
var obj = { a: 1, b: 2 };
var Cypress = {};
Cypress._ = _;
Cypress.moment = moment;
console.log(_.get(obj, "a"));
console.log(Cypress.moment().format("DD/MM/YYYY"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.