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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:35:34+00:00 2026-06-08T00:35:34+00:00

test code is: console.log(true && abc);//abc who can tell me why the result is

  • 0

test code is:

console.log(true && "abc");//abc

who can tell me why the result is abc?

  • 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-08T00:35:36+00:00Added an answer on June 8, 2026 at 12:35 am

    From MDN (Logical Operators) – Logical And (&&):

    Returns expr1 if it can be converted to false; otherwise, returns
    expr2. Thus, when used with Boolean values, && returns true if both
    operands are true; otherwise, returns false.

    true obviously cannot be evaluated to false, so the second value is returned which is “abc”.

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

Sidebar

Related Questions

Given this code: var reg = /a/g; console.log(reg.test(a)); console.log(reg.test(a)); I get this result: true
My code: myobj = new Object(); classes.testegy = Class.extend({ init: function (token) { console.log(test
I have this code inside a iframe: window.addEventListener('message', function(e){ if(e.data == 'test') console.log(e); },
This is my code, myText.enableKeyEvents = true; // ** myText.on('keyup', function(t){ console.log(t.getValue()); }); It
#test code: #!/bin/bash #~/test/test.sh trap echo 'testmessage' DEBUG while : do echo abc sleep
Code snippet is following, Can anyone explain why a.hasOwnProperty(prototype) is true, the others are
my test code is below: main1.c: #include <stdio.h> extern struct tt ; int main()
This is my test code: describe(Login, function(){ beforeEach(function(){ loadFixtures('login-fixture.html'); }) it(should enable the button
After working on some test code for open ID authentication, I had a break
Here is my test code: <script type=text/javascript> YUI({ modules: { 'jquery': { fullpath: 'script/lib/jquery.min.js'

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.