Created
September 20, 2017 07:32
-
-
Save grknylmz/ca27babfa66afe37ff4542dbefac8af9 to your computer and use it in GitHub Desktop.
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
sap.ui.define([ | |
"sap/ui/core/mvc/Controller", | |
"DemoSAPUI5_Underscorejs/lib/underscore" | |
], function(Controller) { | |
return Controller.extend("DemoSAPUI5_Underscorejs.controller.MainView", { | |
onInit: function() { | |
var even = _.find([1, 2, 3, 4, 5, 6], function(num) { | |
return num % 2 == 0; | |
}); | |
console.warn('LOG'); | |
console.log(even); // Should write '2' | |
console.warn('LOG'); | |
var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) { | |
return num % 2 == 0; | |
}); | |
console.log(evens); // Should write '[2, 4, 6]'' | |
console.warn('LOG'); | |
var bool = _.contains([1, 2, 3], 3); // Does array contain '3'? | |
console.log(bool); | |
console.warn('LOG'); | |
debugger; | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment