Created
January 30, 2017 17:53
-
-
Save samueljoli/c6be964418c06c74399993683d5e964f to your computer and use it in GitHub Desktop.
Assembler tricks just for kicks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//javascript | |
if (matches = line.matches(/qty: (\d+)/)) | |
this.quantity = matches[1]; | |
else if (matches = line.matches(/size: (\d+)x(\d)/) | |
this.width = matches[1]; | |
this.height = matches[2]; | |
else if ... and so-on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment