2019年3月8日 星期五

UnderScore js

1. What is uderscore?


s a JavaScript library that provides a whole mess of useful functional programming helpers without extending any built-in objects. It’s the answer to the question: “If I sit down in front of a blank HTML p

ref 1 2_good_example  3_office 4_example



2. Example

2_1
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js">

</script>



_.each([1, 2, 3], function (ele, idx) {
    alert(idx + ":" + ele);
});

沒有留言:

張貼留言