是什么导致此功能无法正常工作?

时间:2018-06-23 13:46:15

标签: javascript

错误:需要一个标识符,而看到了'if'

<?php
          ArrayDates ( [0] => 22/03/2018 [1] => 09/04/2018 [2] => 26/03/2018 
          [3] => 27/11/2017 [4] => 22/01/2018 [5] => 06/09/2017 )
?>
           <script>
           ArrayDates.sort(function (a, b){
                var aa = a.split('-'),
                    bb = b.split('-');

                return aa[2] - bb[2] || aa[1] - bb[1] || aa[0] - bb[0];
            })
          </script>

0 个答案:

没有答案