string substring 3 dan karakter pertama



    const String= "As you can see based on the previous"

    //if local 
    const WAFrist = String.substring(0, 9);
    const WALast = String.slice(-9);
    const FullWA = WAFrist + "..." + WALast;

    <p>{FullWA}</p>

    Result 
    As you ca...e previous

	// if data coming from api
	const WAFrist = String ? String.substring(0, 9) : "";
    const WALast = String ? String.slice(-10) : "";
    const FullWA = WAFrist + "..." + WALast;


    <p>{FullWA}</p>

    Result 
    As you ca...e previous
M Hemel Hasan