react mid senior dev interview questuions

JavaScript
const RedButton = withRedBorder(Button);// and use it as:<RedButton />const Button = props => <button {...props}>Hello</button>;const withRedBorder = Component =>  (props) => (    <Component {...props} style={{ border: "1px solid red" }} />  );
Source

Also in JavaScript: