Xah Web Dev Blog Archive 2015-09

JavaScript quiz of the day. true or false?

function f () {};
Function.prototype = 3;
console.log( f instanceof Function );

refresh here JavaScript “instanceof” Operator, but that still may not answer why.

puzzling? discuss at https://plus.google.com/+XahLee/posts/CLMxi9LGteG


this will silently fail.

// silently fail
Function.prototype = 3;

If you add "use strict", then error is reported.

"use strict";
Function.prototype = 3;

// Function.prototype = 3;
//                    ^
// TypeError: Cannot assign to read only property 'prototype' of function Function() { [native code] }

You cannot change Function.prototype, because the “prototype” property there does not have “writable” attribute.


// output:
// { value: [Function: Empty],
//   writable: false,
//   enumerable: false,
//   configurable: false }

JavaScript: Property Attributes

HTML Input Range: Slider UI

JavaScript: SVG Clock (updated. Using svg transform instead for moving the hands.) 〔►see SVG: Coordinate Transformation

get local copy of html5 spec

the whatwg group finally made building their html5 spec simple. git and build your own for local reading. https://github.com/whatwg/html-build

SVG Path: Elliptical Arc (new)

emacs google plus girl profile spam 2015-09-24 47415
Pretty Girl Spam

now i succumb to the tyranny of JSDoc. http://usejsdoc.org/

JavaScript: Should You Move Variables to the Top? (updated.)

How to Disable JavaScript, Flash, Java in Google Chrome, Firefox, Internet Explorer (repost)

JavaScript: Function Call, Apply, Bind (major rewrite)

JavaScript: How to Get Max/Min Value of a Array? (on its own page)

Web Spam, Scam, Blackhat SEO Collection

CSS: What's a CSS Pixel? What's Reference Pixel? (rewritten)

Like what you read? Buy JavaScript in Depth
or, buy a new keyboard, see Keyboard Reviews.