JSLint Did you mean to return a conditional instead of an assignment

Benchmark created by Pushpanjali on


Test runner

Ready to run.

Testing in
TestOps/sec
return statement without assignment
var result;
function multiply(a, b) {
    result = a * b;
    return result;
}
ready
return statement with assignment
var result;
function multiply(a, b) {
    return result = a * b;
}
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.

  • Revision 1: published by Pushpanjali on