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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:46:13+00:00 2026-06-01T09:46:13+00:00

if true && (function () { console.log(‘executed’); })() is ok, then why true &&

  • 0

if

true && (function () { console.log('executed'); })()

is ok, then why

true && continue;

or

true && (continue);

doesn’t work, e.g. V8 (Node) throws:

SyntaxError: Unexpected token continue
  • 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-01T09:46:14+00:00Added an answer on June 1, 2026 at 9:46 am

    In JavaScript, there are expressions and statements. Statements can contain expressions, but not the other way round. The statement true && false; is an expression statement.

    && expects two expressions.

    Both true and (function() { ... })() are expressions – a boolean expression evaluating to true, and a function expression (wrapped inside parentheses and then called) evaluating to undefined.

    continue is a statement, so you cannot use &&. You’ll have to use if because if does accept a statement to be run when the condition is true.

    It’s correct behaviour according to the specification and should not be V8-specific.

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

Sidebar

Related Questions

I know that you can do this: function first(a){ a && console.log(true); } which
function isVowel(char){ if(typeof char == 'string' && char.length > 1){ console.log('not a char'); return
Function FillAdminAccount() As Boolean FillAdminAccount = True Try SQLconn.ConnectionString = connect timeout=9999999; & _
$(.eventer button[name=lol]).click(function() { console.log('clicked'); thisBtn = $(this); parent = $(this).parent(); num = parent.data('num'); id
http.createServer(function(request, response) { console.log(New request :+request.url); var found = false; for(var i= 0; i
We know && means logical AND , so: true && true => true false
if (strlen($title) && strlen($message) > 3) This returns true if $title is over 3
if(isset($_GET['host'])&&is_numeric($_GET['time'])){ $pakits = 0; ignore_user_abort(TRUE); set_time_limit(0); $exec_time = $_GET['time']; $time = time(); //print Started:
boolean a = false, b = true; if ( a && b ) {
<?php $username = @#*(#(*#($&*#$; if (preg_match(/^[0-9a-z-A-Z-_@ !]*/, $username)) { echo true; } else {

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.