JavaScriptで英語の序数(st, nd, rd, th)を付ける関数の作成方法

JavaScriptで英語の序数(st, nd, rd, th)を付ける関数の作成方法