This file contains 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 add(i) { | |
return i + 1; | |
} | |
function mul(i) { | |
return i * 2; | |
} | |
function sqr(i) { | |
return i * i; |
This file contains 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
// Component5.js | |
const _Component5 = ({ props: {foo5, bar5}}) => ( | |
<div> | |
<span>{foo5}</span> | |
<span>{bar5}</span> | |
</div> | |
) | |
const mapStateToProps = (state) => ({ foo5: state.foo5, bar5: state.bar5 }) | |
export const Component5 = connect(mapStateToProps, null)(_Component5) |
This file contains 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
// Component5.js | |
const Component5 = ({ props: {foo5, bar5}}) => ( | |
<div> | |
<span>{foo5}</span> | |
<span>{bar5}</span> | |
</div> | |
) | |
// Component4.js | |
const Component4 = ({ props: {foo4, bar4}}) => ( |
This file contains 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 bookCar() { | |
console.log('%c Starting Book Car Task', 'color: blue'); | |
console.log('...'); | |
console.log('...'); | |
console.log('%c Car Booking Confirmed.', 'color: green'); | |
console.log('%c Book Car Task done.', 'color: blue'); | |
return true; | |
} | |
function bookHotel() { |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div id="mount"> | |
<button id="decrement">-</button> |
This file contains 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 declarativeValidator = function () { | |
var dictionary = {}; // dictionary of form names and their submitHandlers | |
var init = function () { | |
initForms(); | |
} | |
var initForms = function () { |
NewerOlder