this code gives error which makes perfectly sense
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<script>
usestricr
</script>
</body>
</html>
but this doesn't why
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<script>
"usestricr"
</script>
</body>
</html>
please help i'am noob in this
So that triggering strict mode in JS engines that support it wouldn’t cause errors to be thrown in older engines, the code to trigger it is just a string.
Putting a different string there is still just a string which is still syntactically valid even if semantically nonsense.