Grimoire-
Command
.es

GNU+Linux command memo

Start new JavaScript file

JavaScript code

Démarrer un nouveau fichier JavaScript proprement.

;(function (){  (1) (2)
	'use strict'; (3)
	// All code here.
}());
1 Avoid beeing interpreted by too old and buggy interpreters.
2 Be executed once, while the page is loaded.
3 Use the new ECMAScript 5+ strict conventions to improve the language.

Explicit version :

function init() {
	// All code here.
}
init()

Just declare a function an call it.

Only use 'use script' if you are not using module flavoured JavaScript.

Selection

  • Check SSD remaining lifetime
  • Save data from lost partition
  • Cipher external Android SDcard
  • Recommanded Firefox addons
  • doc_crawler.py : Extract site PDFs
  • 20 mémos "ligne de commande"
  • [Mémo 8] compression de fichiers
  • [Mémo 10] explorer le matériel
  • Tectonique de la pâte thermique
  • Doc. AsciiDoctor en français
  Articles | Command.es | Mémos

Themes  

  • Artix
  • Debian
  • Fairphone
  • Firefox
  • Git
  • JavaScript
  • KVM
  • Memo
  • Nim
  • Python
  • SSH
  • Tor
  • Xorg
  • adminsys
  • android
  • asciidoc
  • benchmark
  • bluetooth
  • code
  • comfort
  • compression
  • database
  • date
  • game
  • hardware
  • install
  • metadata
  • mount
  • music
  • mutt
  • network
  • optimization
  • optimize
  • regex
  • repair
  • security
  • shell
  • storage
  • vim

Sponsor

Meta-Press.es: search-engine

Liberapay   Patreon

Support via BTC 12z7pK5YFcmG7PGJ985dFtnRzwtxDVDmwc

A propos  Flux