Outils pour utilisateurs

Outils du site


Panneau latéral

webdev:javascript:basics

Ceci est une ancienne révision du document !


Basics

Get the length of an object (ES5) :

var size = Object.keys(myObj).length;

Events

  • On Chrome e.originalEvent.screenX take different values than e.originalEvent.clientX, unlike Firefox.

Promises

Check if a variable exist in javascript without getting an error

Source

if( typeof google_step != 'undefined')
{
	// ...
}

Objects

webdev/javascript/basics.1541439008.txt.gz · Dernière modification: 05/11/2018 18:30 de dolo