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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T01:53:39+00:00 2026-06-19T01:53:39+00:00

I came across this line of code in Underscore.js’s _.each implementation and I am

  • 0

I came across this line of code in Underscore.js’s _.each implementation and I am curious what is going on here. What does the ‘+’ in front of the obj do?

if (obj.length === +obj.length) { ... }

  • 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-19T01:53:40+00:00Added an answer on June 19, 2026 at 1:53 am

    The if tests that obj.length is numeric and not NaN. The right-hand side is always a number (or NaN if obj.length cannot be interpreted as a number). It will only be === to the left-hand side if obj.length is also a number.

    Note that using isNaN won’t work if obj.length is a numeric-looking string; that is, isNan("3") returns false. Note also that NaN === NaN is false—NaN is never === to anything.

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

Sidebar

Related Questions

Came across this code. def setup(&block) @setups << block end What does this line
I came across this due to a bug in my code and I'm curious
I came across this line of code: if( -f <filename> ) { ... }
I came across this line of code in an application I am revising: substr($sometext1
I came across this line in some code and can't find the syntax defined
I was looking at some code and I came across this line: Machine drink[]
I was looking at some code examples and I came across this line: puts
I was examining some code on github https://github.com/umlaeute/v4l2loopback/blob/master/v4l2loopback.c and came across this line, which
I was reading Pulling the switch here and came across this code. Can somoone
I just came across this line of code: SDL_Color textColor = { 255, 0,

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.