Tambahkan nomor baris di JavaScript
const addLineNum = (string) => {
const newText = string
.split("\n")
.map((line, index) => `${index + 1}. ${line}`)
.join("\n");
return newText
};
mrmalik610