negative ?()是Ruby中的內置方法,返回布爾值。如果數字為負數,則返回true,否則返回false。 用法:num.negative?() 參數:該函數需要一個要檢查的數字。
確定! 回上一頁