Ad
  • Custom User Avatar

    一開始寫的時候不知道 "use strict" 是啥,就把它刪掉了 :sweat_smile:

    在程式碼前,或是單一function的一開始,加入"use strict",代表嚴格模式;
    在此模式下,不能使用未聲明的變數。
    
  • Custom User Avatar

    一開始把 return false 放在 else if 下面
    導致只要一不符合條件的時候就會跳出function,而沒辦法 go through 整個 array。

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    One thing, the comments under solutions can be publicly seen to everyone. Therefore even when posting here, if your comment contains working or partial solutions, or other solution-spoiling content, check the 'Mark as having spoiler content' box or click the 'Spoiler' flag. I've already done this for you this time.

    Also, why are you posting solutions like this? Everyone's solution is already listed in the solutions tab and I don't see why you want to show off your solution under someone else's...

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Hi ulahsieh, you should know you cannot post code like this without a spoiler tag, otherwise anyone can see your solution. (I have just now added the tag)

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution