Skip to content

Instantly share code, notes, and snippets.

@id-den
Created March 23, 2016 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save id-den/7b2bfbe1be21b19bcddb to your computer and use it in GitHub Desktop.
Save id-den/7b2bfbe1be21b19bcddb to your computer and use it in GitHub Desktop.
esnextbin sketch
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ESNextbin Sketch</title>
<!-- put additional styles and scripts here -->
</head>
<body>
<!-- put markup and other contents here -->
</body>
</html>
'use strict';
function showMenu(title = "Без заголовка", width = 100, height = 200) {
console.log(`${title} ${width} ${height}`);
}
showMenu("Меню");
{
"name": "esnextbin-sketch",
"version": "0.0.0"
}
'use strict';
function showMenu() {
var title = arguments.length <= 0 || arguments[0] === undefined ? "Без заголовка" : arguments[0];
var width = arguments.length <= 1 || arguments[1] === undefined ? 100 : arguments[1];
var height = arguments.length <= 2 || arguments[2] === undefined ? 200 : arguments[2];
console.log(title + " " + width + " " + height);
}
showMenu("Меню");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment