1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
EastWind [94]
2 years ago
13

write a function `keyvalueduplicates(obj)` that takes an object as an argument and returns an array containing all keys that are

also values in that object.
Computers and Technology
1 answer:
wariber [46]2 years ago
4 0

A function `keyvalueduplicates(obj)` that takes an object as an argument and returns an array containing all keys that are also values in that object is given below:

<h3>The Code:</h3>

function customFilter(v) {

 return (v.indexOf('c') === 0);

}

function filterValuesByKeys(obj, filter) {

 var ary = [],

     keys = Object.keys(obj);

 keys.forEach(function(k) {

   if (filter(k)) {

     ary.push(obj[k]);

   }

 })

 return ary;

}

var person = {

 name: 'George',

 age: 50,

 address: '1 center st',

 city: 'some city',

 state: 'some state',

 country: 'USA'

};

var result = filterValuesByKeys(person, customFilter);

console.log(result);

Read more about program functions here:

brainly.com/question/26560127

#SPJ1

You might be interested in
What are html documents also called?
11Alexandr11 [23.1K]
HyperText Markup Language
4 0
3 years ago
Marissa, a 21-year-old young woman, is working as an intern at a software company. She has recently graduated from college. She
Zigmanuir [339]

Answer:

She is experiencing the features of feeling in between.

Explanation:

Because she graduated from college currently and she thinks about moving seriously with her boyfriend or best friend and she also thinks about the convenience and safety which she gets in her parents' house. She confused because she is not completely in the adult stage and currently, she passed through from the stage of adolescence, so that's why she experiencing feeling in between.

3 0
4 years ago
Print ___________ command is used for adding numbers.​
quester [9]

Answer:

phyton is the answer....

5 0
3 years ago
What are the other way of getting website static​
erica [24]

Answer:

Explanation: Jekyll. Jekyll is far and away the most popular static site generator. ...

Hexo. Hexo is a build tool created with nodeJS, which allows for super speedy rendering, even with extremely large sites

and Hugo

I hope this help =D

7 0
3 years ago
Read 2 more answers
All who are interested in forex trading and bitcoin mining follow me for account management to all who are busy with work so i c
masya89 [10]

I am very interested but too young just 10

8 0
3 years ago
Other questions:
  • You want to arrange 6 of your favorite CD's along a shelf. How many different ways can you arrange the CD's assuming that the or
    15·1 answer
  • Cleaning the keyboard is the most important part of keeping your computer running at peak performance.
    5·2 answers
  • Can I recover my data from HDD if I just started formatting but did not finish it? (I ceased it!)
    7·1 answer
  • Jessica has a balance of $2,200 on her credit card with an 18% interest rate. Her credit card company doesn’t require a minimum
    15·1 answer
  • Which is an example of a tertiary source?
    13·1 answer
  • If you reset your iPhone will it delete everything including your Apple ID information
    9·2 answers
  • A cell reference with only one dollar sign before either the column or the row is called an absolute reference.
    10·1 answer
  • What type of data would a RDBMS store in a linked list, two-way linked list, or B-trees? What are the advantages and disadvantag
    5·1 answer
  • How can data be calculated?
    14·2 answers
  • This the code from the last post I did
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!