-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdom.js
38 lines (31 loc) · 1.22 KB
/
dom.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"use strict";
//note: in order to for the modules to work in firefox a config flag needs to be flipped
// //modules are experimental at the time of writing this comment(8th Feb 2018/FF 58.0.2)
// export default {
// printAsyncDymmy(arr) {
// // //asynchronosity expectations broken:
// // for (var i = 0; i < 3 ; i++) {
// // //hoisting of 'i':
// // setTimeout(function () {
// // console.log('i: ' + i + ', arr[' + i + ']: ' + arr[i]);
// // }, 0);
// // }// Output: i: 3, arr[3]: undefined
// arr.forEach(function(element) {
// var elem = element;
// setTimeout(function() {
// console.log(elem);
// }, 0);
// }); // Output: 1 2 3
// }
// };
// let par = {p: "1", q: "2"};
// let {pp: p, qq: q, rr="3"} = par;
// function test({req:required, opt:optional=0} = {req:1, opt:1}) {
// console.log("required: " + required + ", optional: " + optional);
// }
function test1({ title: englishTitle } = { title: "Scratchpad" }) {
return "";
}
function test({ req: required, opt: optional = 0 } = { req: 1, opt: 1 }) {
console.log("required: " + required + ", optional: " + optional);
}