add property to string js
snippet in javascript

add property to string js

user1693

  const s = 'Hello world!'
  s.user = 'Jack';     // no error if used without 'use-strict'

  console.log(s.user); // undefined