Answer to Question #242651 in HTML/JavaScript Web Application for Bali

Question #242651

Given an array

myArray, write a JS program to check whether each value of the array is a string or not using the array method every().Input

  • The input will be a single line containing an array myArray
1
Expert's answer
2021-09-27T04:52:49-0400
let arr = [ 'recycling', 70, 'pastime', 'animal' ];
let result = arr.every(function(value) {
  return "string" === typeof value
});
console.log(result);

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS