Skip to content

Instantly share code, notes, and snippets.

@easierbycode
Created April 26, 2016 21:31
Show Gist options
  • Save easierbycode/1b6e640e8a1f1bb18f64dccac0180869 to your computer and use it in GitHub Desktop.
Save easierbycode/1b6e640e8a1f1bb18f64dccac0180869 to your computer and use it in GitHub Desktop.
'use strict';
let salary = ['32000', '50000'];
[low, average, high = '90000'] = salary;
console.log( high )
// 90000
function reviewSalary([low, average], high = '90000') {
console.log( average );
}
reviewSalary(['32000', '50000'])
// 50000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment