#javascript convert array to map
new Map([...["a", "b", "c"].entries()]);
Array.prototype.entries http://xahlee.info/js/js_Array.prototype.entries.html
Notices tagged with javascript, page 18
-
∑ XahLee (xahlee@noagendasocial.com)'s status on Wednesday, 03-Jan-2018 20:53:47 EST ∑ XahLee
-
∑ XahLee (xahlee@noagendasocial.com)'s status on Wednesday, 03-Jan-2018 19:58:47 EST ∑ XahLee
learn #JavaScript es2015 the Map Object in 5 minutes http://xahlee.info/js/javascript_map.html
-
∑ XahLee (xahlee@noagendasocial.com)'s status on Wednesday, 03-Jan-2018 11:24:33 EST ∑ XahLee
#JavaScript learn ECMAScript 2015 Features in depth in 1 hour
Example based. To the point. No ninja zen cool bullshit.
http://xahlee.info/js/js_ECMAScript_2015_features.html -
∑ XahLee (xahlee@noagendasocial.com)'s status on Tuesday, 02-Jan-2018 14:22:39 EST ∑ XahLee
#javascript a summary of all regex methods, how they differ
http://xahlee.info/js/js_regex.html -
∑ XahLee (xahlee@noagendasocial.com)'s status on Tuesday, 02-Jan-2018 12:15:20 EST ∑ XahLee
today's #javascript tips.
String.prototype.search
http://xahlee.info/js/js_String.prototype.search.htmlString.prototype.match
http://xahlee.info/js/js_String.prototype.match.htmlRegExp.prototype.exec
http://xahlee.info/js/js_RegExp.prototype.exec.html -
∑ XahLee (xahlee@noagendasocial.com)'s status on Tuesday, 02-Jan-2018 02:40:01 EST ∑ XahLee
say you want to learn #JavaScript. but, the js accounts there, all tweets bleeding incomprehensible ephemeral things, mostly marketing + click bait. There is basically no account that you can actually learn something. How did we get to this point?
those spamming click bait accounts, i suppose, they work in statical fashion. i.e. they tweet a ton, and vast majority usually perhaps on twitter just 1 hour a day. So, as long as some random thumb up them, overal, spammy works out as optimal strategy
-
∑ XahLee (xahlee@noagendasocial.com)'s status on Monday, 01-Jan-2018 22:18:08 EST ∑ XahLee
this is how to create a range function in #JavaScript
const xah_range = ((n) => [...Array(n).keys()] ) ;
It'll take 1 month to understand how that js code works.
involves spread operator, iterable, interface.
The semantics of js is more complex than perl python ruby lisp java. -
∑ XahLee (xahlee@noagendasocial.com)'s status on Monday, 01-Jan-2018 16:20:03 EST ∑ XahLee
#JavaScript Array.prototype.keys
http://xahlee.info/js/js_Array.prototype.keys.html
and
Array.prototype.values
http://xahlee.info/js/js_Array.prototype.values.html
are idiotic. They return 0,2,3... or the array values. -
∑ XahLee (xahlee@noagendasocial.com)'s status on Monday, 01-Jan-2018 13:11:58 EST ∑ XahLee
#JavaScript surprised to find out that Array.prototype.values() is not supported by Google Chrome, Firefox. Also, it's a entirely useless method.
-
∑ XahLee (xahlee@noagendasocial.com)'s status on Monday, 01-Jan-2018 12:06:25 EST ∑ XahLee
if you haven't mastered #emacs abbrev yet, do today.
6 months ago, i've been happily using
u → you
r → are
ur → your
ull → you'll
hv → have
haven't → haven't
n → and
dnt → don't, 1 thousand others for elisp, #javascript, etc.
here's how to setup
http://ergoemacs.org/emacs/emacs_abbrev_mode.html -
∑ XahLee (xahlee@noagendasocial.com)'s status on Monday, 01-Jan-2018 02:54:02 EST ∑ XahLee
worked 10 hours on my tutorial
JavaScript in Depth
http://xahlee.info/js/js.htmlnew or updated pages include:
#JavaScript Object.prototype.__proto__
http://xahlee.info/js/js_Object.prototype.__proto__.htmlJS: Get/Set Prototype
http://xahlee.info/js/js_find_objects_prototype.htmlJS: “in” Operator
http://xahlee.info/js/js_in_operator.html#JavaScript Spread Operator
http://xahlee.info/js/javascript_spread_operator.htmlJS: Iterator
http://xahlee.info/js/javascript_iterator.htmlJS: Array.prototype.entries
http://xahlee.info/js/js_Array.prototype.entries.html -
∑ XahLee (xahlee@noagendasocial.com)'s status on Sunday, 31-Dec-2017 13:24:15 EST ∑ XahLee
Massive Upgrade JavaScript in Depth to ES2015
here's 5 pages for end of the year day.
JS: Replace All Children, createDocumentFragment
http://xahlee.info/js/js_dom_createDocumentFragment.htmlJS: String.prototype
http://xahlee.info/js/js_string_methods.htmlJS: String Object
http://xahlee.info/js/js_string_properties.htmlJS: String.prototype.constructor
http://xahlee.info/js/js_String.prototype.constructor.html#javascript RegExp Syntax
http://xahlee.info/js/js_regex_syntax.html -
∑ XahLee (xahlee@noagendasocial.com)'s status on Saturday, 30-Dec-2017 15:34:48 EST ∑ XahLee
web tech is changing and adding features very fast.
Animation on the web, current states of the art
http://xahlee.info/js/svg_animation.html
#javascript -
∑ XahLee (xahlee@noagendasocial.com)'s status on Saturday, 30-Dec-2017 04:44:19 EST ∑ XahLee
massive updates to my #JavaScript tutorial. Here's 5 pages for today.
JS: RegExp Tutorial
http://xahlee.info/js/js_regex_tutorial.htmlJS: RegExp.prototype.exec
http://xahlee.info/js/js_RegExp.prototype.exec.htmlJS: Convert String to Number
http://xahlee.info/js/js_convert_between_string_and_number.htmlJS: Function Declaration vs Function Expression
http://xahlee.info/js/javascript_function_declaration_vs_expression.htmlJS: Function Parameters
http://xahlee.info/js/javascript_function_arguments.html -
∑ XahLee (xahlee@noagendasocial.com)'s status on Saturday, 30-Dec-2017 01:46:09 EST ∑ XahLee
#javascript simplest way to add method to prototype
http://xahlee.info/js/js_prototype.html -
∑ XahLee (xahlee@noagendasocial.com)'s status on Saturday, 30-Dec-2017 01:09:19 EST ∑ XahLee
#JavaScript quiz. x.y.z Associativity, Right or Left?
http://xahlee.info/js/js_x.y.z_associativity_right_or_left.html -
∑ XahLee (xahlee@noagendasocial.com)'s status on Friday, 29-Dec-2017 22:10:51 EST ∑ XahLee
understand #JavaScript function's “arguments” object in 3 minutes http://xahlee.info/js/js_function_arguments_object.html
-
∑ XahLee (xahlee@noagendasocial.com)'s status on Friday, 29-Dec-2017 18:06:53 EST ∑ XahLee
the best explanation of #JavaScript Iterator you'll ever see http://xahlee.info/js/javascript_iterator.html
-
∑ XahLee (xahlee@noagendasocial.com)'s status on Friday, 29-Dec-2017 16:56:03 EST ∑ XahLee
#JavaScript 3 ways to Find Object's Prototype
http://xahlee.info/js/js_find_objects_prototype.html -
∑ XahLee (xahlee@noagendasocial.com)'s status on Friday, 29-Dec-2017 11:45:04 EST ∑ XahLee
understand #JavaScript Global Variable, Implied Global, Global Property, in 5 minutes.
http://xahlee.info/js/javascript_global_var.html