3 December 2021

substring function in react js

import React from 'react';

function SubstringEXP(props) {
    var str = "Hello world, react js SubString example";
    return (
        <div>
            <div><h1>SubString example</h1></div>
            {str.substring(0,10)}
        </div>
    );
}

export default SubstringEXP;

Github link: https://github.com/adi501/react-js-example

No comments:

Post a Comment