Check if a string is entirely made of the same substring
JavaScript (ES6), 22 bytes

Returns a Boolean value.



s=&gt;/^(.*)\1+$/.test(s)


Try it online!



Without a regular expression, &nbsp;33&nbsp; 29 bytes

Returns either null (falsy) or an object (truthy).



s=&gt;(s+s).slice(1,-1).match(s)


Try it online!

NB: Technically, \$s\$ is converted to a regular expression for match(), so the above title is a lie.