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
let array = [], sortedArray; | |
const getRandomNumber = () => Math.round(Math.random() * 100); | |
for (let i = 0; i < 100; i++) array[i] = getRandomNumber(); | |
console.log('initial array: ', array); | |
const checkIfArrayIsSorted = array => { | |
let isSorted = true; |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Query Params', | |
queryParams: ['offset', 'search'], | |
offset: 0, | |
search: undefined, | |
prevLink: Ember.computed('offset', function() { | |
return this.get('offset') >= 10 ? this.get('offset') - 10 : 0; |