Answers for "set methods in js"

0

set method in javascript

const language = {
  set current(name) {
    this.log.push(name);
  },
  log: []
};

language.current = 'EN';
language.current = 'FA';

console.log(language.log);
// expected output: Array ["EN", "FA"]
Posted by: Guest on July-22-2021
-1

set methods in js

let chars = new Set(['a', 'a', 'b', 'c', 'c']);Code language: JavaScript (javascript)
Posted by: Guest on March-08-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language