Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

add property to string js

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

  console.log(s.user); // undefined
Source by learn.coderslang.com #
 
PREVIOUS NEXT
Tagged: #add #property #string #js
ADD COMMENT
Topic
Name
6+3 =