Skip to content

Instantly share code, notes, and snippets.

@weshouman
Last active June 9, 2022 09:17
Show Gist options
  • Save weshouman/b6f89e420d49f7795fcb480253351c5c to your computer and use it in GitHub Desktop.
Save weshouman/b6f89e420d49f7795fcb480253351c5c to your computer and use it in GitHub Desktop.
Javascript tips and tricks #study #javascript

Caution

This Gist is a WIP

Multiple variable assignment

var a, b, c;
a = b = c = 10;
alert(a + b + c)

source

Importing Files

Background: javascript modules were usually written as single files, however nodejs came with the modules concept in mind, thus require exists for it, then ecmascript 6 came with the export/import syntax, follow this guide for implementation details of both the methods

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment