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 myRevealingModule = (function () { | |
var privateVar = "Ben Cherry"; | |
var publicVar = "Hey there!"; | |
function privateFunction() { | |
console.log( "Name:" + privateVar ); | |
} | |
function publicSetName( strName ) { | |
privateVar = strName; |
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
//my-module.js | |
var privateVar = "Ben Cherry"; | |
var publicVar = "Hey there!"; | |
function privateFunction() { | |
console.log( "Name:" + privateVar ); | |
} | |
function publicSetName( strName ) { | |
privateVar = strName; |
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
//my-module.js | |
define([], function() { | |
var privateVar = "Ben Cherry"; | |
var publicVar = "Hey there!"; | |
function privateFunction() { | |
console.log( "Name:" + privateVar ); | |
} | |
function publicSetName( strName ) { |
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
//my-module.js | |
let privateVar = "Ben Cherry"; | |
export const publicVar = "Hey there!"; | |
const privateFunction = () => { | |
console.log( "Name:" + privateVar ); | |
} | |
export const publicSetName = (strName) => { | |
privateVar = strName; |
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
//array.js | |
export function each(collection, callback) { | |
//something interesting | |
} | |
export function filter(collection, callback) { | |
//something interesting | |
each(collection, ...) | |
//something interesting |
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
const { resolve, join } = require('path') | |
const CompressionPlugin = require('compression-webpack-plugin') | |
module.exports = { | |
entry: './app.js', | |
output: { | |
path: resolve(join(__dirname, 'build')), | |
filename: 'app.js' | |
}, | |
module: { |
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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="shortcut icon" href="/favicon.ico"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>initial hmtl example</title> | |
<link href="/static/css/main.487d312c.css" rel="stylesheet"> | |
</head> |
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
lampard = | |
{ name = "Frank" | |
, lastname = "Lampard" | |
, age = 41 | |
} | |
type alias Player = | |
{ name : String | |
, lastname : String |
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
list = | |
[ 1, 2, 3, 4 ] | |
push = | |
list ++ [ 5 ] | |
unshift = | |
0 :: list |
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
type Maybe a | |
= Just a | |
| Nothing | |
-- Partial Functions | |
-- toFloat : String -> Maybe Float | |
a = | |
String.toFloat "123" |
OlderNewer