CTRL
+ SHIFT
+ ->
- expand selection
CMD
+ D
- Select the word
F8
- show the error info
CMD
+ Shift
+ L
- select all words
SHIFT
+ CMD
+ K
- delete line
CTRL
+ SHIFT
+ ->
- expand selection
CMD
+ D
- Select the word
F8
- show the error info
CMD
+ Shift
+ L
- select all words
SHIFT
+ CMD
+ K
- delete line
++[[]][+[]]+[+[]] |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<form id="form"> | |
<label>name: | |
<input type="text" id="txtname" value="Example name" tabindex="1" autocomplete="off"></label> |
CSS | |
.disable-hover { | |
pointer-events: none; | |
} | |
JS | |
var body = document.body, | |
timer; | |
window.addEventListener('scroll', function() { |
var Constructor = function() { | |
if (!(this instanceof Constructor)) { | |
return new Constructor(); | |
} | |
// Properties and methods... | |
this.something = 'something'; | |
// ... | |
} |
var arrayObject = ["What", "is", "going", 0,"on", 111,"..", "here"]; | |
String.prototype.slice.call(arrayObject); | |
//"What,is,going,0,on,111,..,here" | |
String.prototype.concat.call(arrayObject); | |
//"What,is,going,0,on,111,..,here" | |
String.prototype.substring.call(arrayObject,1,10) | |
//"hat,is,go" | |
String.prototype.indexOf.call(arrayObject, "n,111") | |
//17 | |
var listener = node.addEventListener("click", function(event) { | |
let _target = event.target; | |
this.handleClick(_target); | |
}.bind(this)); | |
//Inside we call a local method called handleClick() with the event’s target property. Nothing too exciting. | |
//With Fat Arrow Functions, that becomes: | |
var listener = node.addEventListener("click", (event) => { | |
let _target = event.target; | |
this.handleClick(_target); |
var slice = Array.prototype.slice; | |
// slice is now "unbound". As Array.prototype.slice usually | |
// acts on the context it is given, or "this", it will | |
// no longer work. | |
slice(0, 1); // => TypeError: can't convert undefined to object | |
slice([1,2,3], 0, 1); // => TypeError: ... | |
// But if we recall apply and call, they let us supply a context. | |
slice.call([1,2,3], 0, 1); // => [1] |
'\uD83D\uDCA9' // => '💩' | |
'\u2661'// => '♡' |
Shape.prototype = { | |
move: function(x, y) { | |
this.x += x; | |
this.y += y; | |
var checkBounds = function(min, max) { | |
if (this.x < min || this.x > max) { | |
console.error('Warning: Shape out of bounds'); | |
} | |
}.bind(this); |