Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8374355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:54:16+00:00 2026-06-09T14:54:16+00:00

Uncaught ReferenceError: uneval is not defined It works well with Firefox, but not work

  • 0

Uncaught ReferenceError: uneval is not defined

It works well with Firefox, but not work with Google Chrome.

I try:

var getSaved = [['ABC', 'http://...'], ['DEF', 'http://...'], ['...etc...']];
var get_saved_items = eval(getSaved);
var name = [], url = [];
for (var i = 0; i < get_saved_items.length; i++) {
    name[i].push(get_saved_items[i][0]);
    url[i].push(get_saved_items[i][1]);
};
window.localStorage.setItem('saved_name', uneval(name));
window.localStorage.setItem('saved_links', uneval(url));

it returns: Uncaught ReferenceError: uneval is not defined

What’s the problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T14:54:17+00:00Added an answer on June 9, 2026 at 2:54 pm

    Using ‘eval’ is not recommended because of different reasons (you can google it). uneval will not work in other browsers.

    For your requirement you can use a JSON parser. Widely used one is Crockford’s JSON parser.

    https://github.com/douglascrockford/JSON-js/blob/master/json2.js

    var numbers = '[1, 2, 3, 4, 5, 6]'; 
    var names = '["abc", "def", "ghi", "jkl", "mno", "pqr"]';
    
    // string to Javascript object 
    var numbersObject = JSON.parse(numbers);
    var namesObject = JSON.parse(names);
    
    console.log(numbersObject);
    console.log(namesObject);
    
    // Javascript object to string
    numbers = JSON.stringify(numbersObject);
    names = JSON.stringify(namesObject);
    
    console.log(numbers);
    console.log(names);
    

    demo : http://jsfiddle.net/xVvBp/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get Uncaught ReferenceError: bierta (or whatever the URL var is) is not defined
I get uncaught referenceerror: invalid left-hand side in assignment (anonymous function) in google chrome
I am getting this error Uncaught ReferenceError: loadNext is not defined (anonymous function) The
I have this "Uncaught ReferenceError: function is not defined" error which do not understand.
Any idea why I have the error Uncaught ReferenceError: hello is not defined ?
new to javascript/jquery. Im getting the following error... Uncaught referenceError: $is not defined and
Uncaught ReferenceError: JQueryValidatorUI is not defined when using jquery-validation-ui plugin ? also Uncaught TypeError:
Possible Duplicate: “Uncaught ReferenceError: JQueryValidatorUI is not defined”? Any familiar with jquery-validation-ui plugin for
I am trying to use jquery for browser detection but it says Uncaught ReferenceError:
I have a cshtml page that gives these errors: Uncaught ReferenceError: $ is not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.