Guest User

Untitled

a guest
Feb 23rd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. export default Ember.Helper.helper(function([value]) {
  2. return value.toUpperCase();
  3. });
  4.  
  5. // Example
  6. function destructureThis([a, b, c]){
  7. console.log(a, b, c);
  8. }
  9.  
  10. var shortArray = [1, 25];
  11. destructureThis(shortArray);
  12.  
  13. // Prints to console:
  14. // 1 25 undefined
  15.  
  16. var longerArray = [1, 5, 9, 50, 60];
  17. destructureThis(longerArray);
  18.  
  19. // Prints to console:
  20. // 1 5 9
Add Comment
Please, Sign In to add comment