SUBSTRING STRING LAST 3 et premier caractère



    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