Answers for "add property to string js"

1

add property to string js

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

  console.log(s.user); // undefined
Posted by: Guest on February-06-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language