Skip to content

Instantly share code, notes, and snippets.

@1dolinski
Created February 11, 2014 05:28
Show Gist options
  • Save 1dolinski/8929710 to your computer and use it in GitHub Desktop.
Save 1dolinski/8929710 to your computer and use it in GitHub Desktop.
not best practice?
function js(str, callback) {
console.log("Code");
callback && callback(str);
}
js("JavaScript", function (str) {
console.log(str);
});

#1 Expected an assignment or function call and instead saw an expression. callback && callback(str); // Line 4, Pos 3 [Finished in 0.1s]

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