Using a typeof type guard. Consider the following function which duplicates the parameter if it is a string or doubles it if it is a number :.
確定! 回上一頁