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

  • Home
  • SEARCH
  • 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 8988675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:03:36+00:00 2026-06-15T22:03:36+00:00

If I use console.log to log an object from inside a script, I can

  • 0

If I use console.log to log an object from inside a script, I can see that object in the console, and I can inspect it by clicking the little arrows. So I can see what methods it has (even in its prototype). But is it possible for me to run one of those methods from right there in the console?

In other words, is there some kind of magic variable (similar to $0) that I can type into the console, which will get me the last logged object?

  • 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-15T22:03:37+00:00Added an answer on June 15, 2026 at 10:03 pm

    You can actually use $_ to get the previously evaluated statement

    $$   // Returns an array of elements that match the given CSS selector.
    $0   // The currently-selected object in the inspector.
    $_   // The previously evaluated statement
    $1   // The previously-selected object in the inspector.
    $n(index)    // Access to an array of last 5 inspected elements.
    

    For a complete list of everything there is that you can use for all parts of chrome check out the cheatsheet. http://anti-code.com/devtools-cheatsheet/

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

Sidebar

Related Questions

if I use: jQuery(document).ready(function() { console.log($(this)); }); then in console I have object: [Document
Firebug is certainly a wonderful tool for javascript debugging; I use console.log() extensively. I
I install ruby via rbenv-installer . When I use irb console, I can use
I'm trying to use the Rails Console to create object instances of my models.
I use a lot of lines like that Console.WriteLine(Test); to debug application under VS
I would like to use the jenkins script console some more. Where do I
I would like to use it to generate html log files inside the process_exception()
I need to distinguish 0 from 0 in Firebug console.log output. If you type
I am trying to use the data I have received from a php script,
I'm trying to use a JSON response object that is ordered by email to

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.