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 7059063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:11:14+00:00 2026-05-28T04:11:14+00:00

When i run this bit of code in Firebug: var s =test; var S=new

  • 0

When i run this bit of code in Firebug:

 var s ="test";
 var S=new String(s);
 S.len=4;
 var t = S.len;
 console.log(t);
 typeof(S);
 S;

It totally omits the output for typeof(S);
But if I do:

  var s ="test";
  var S=new String(s);
  S.len=4;
  var t = S.len;
  console.log(t);
  console.log(typeof(S));
  S;

It does just right, what’s going on?

  • 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-05-28T04:11:15+00:00Added an answer on May 28, 2026 at 4:11 am

    Firebug’s log gives you the result of the last expression (as a debug feature), not each expression. Anything passing console.log() will of course turn up, and you’ll see this if you do

    console.log(typeof (S));
    

    But it throws in the return value of the last expression and the end, always, but not the preceding ones.

    Thus the sequence:

    S;
    typeof (S);
    

    Will yield the return value of typeof (S); and nothing else and the sequence:

    typeof (S);
    S;
    

    Will yield the return value if S (which is just S). Since the results aren’t stored anywhere in your code it just runs the expression and does away with the result, except in the last expression of any of the above sequences, where Firebug shows you what the result was. This is to facilitate say running a jQuery expression or the like.

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

Sidebar

Related Questions

When I run this bit of code through GCC I get this warning on
Can I run a 64-bit VMware image on a 32-bit machine? I've googled this,
When I run this code the selected item is not visible. I've already tried
when i run this code : CONADefinitions.CONAPI_FOLDER_INFO2 FolderInfo; int iResult = 0; IntPtr Buffer
So I run this Windows Server 2008 security update and this code block is
When I run this code, About half-way through the concatenation loop, $xml becomes null
This bit of code behaves differently under Perl 5.8 than it does under Perl
I'm currently starting a new project and I've run into a bit of a
I have a little bit of code that looks just like this: function StrippedExample(i1,
I'm setting up a dev environment and I have this bit of code bothering

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.