Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

253
Views
Why do elements from html to js file go as objects
var toplama_islemi = (document.getElementById("toplama_islemi").style.display ="none");

var cıkarma_islemi = (document.getElementById("cıkarma_islemi").style.display ="none");

var carpma_islemi = (document.getElementById("carpma_islemi").style.display ="none");

var bolme_islemi = (document.getElementById("bolme_islemi").style.display ="none");

And why are there two equal signs here?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Those aren't comparisons. They're assignments. The styles are applied to the elements, and then the elements' style property values are assigned to variables.

Here's a demonstration.

setTimeout(function() {

  var toplama_islemi = (document.getElementById("toplama_islemi").style.display = "none");
  var cıkarma_islemi = (document.getElementById("cıkarma_islemi").style.display = "none");
  var carpma_islemi = (document.getElementById("carpma_islemi").style.display = "none");
  var bolme_islemi = (document.getElementById("bolme_islemi").style.display = "none");
  
  console.log({toplama_islemi, cıkarma_islemi, carpma_islemi, bolme_islemi});

}, 2000);
<p>Wait for it...</p>

<div id="toplama_islemi">toplama_islemi</div>
<div id="cıkarma_islemi">cıkarma_islemi</div>
<div id="carpma_islemi">carpma_islemi</div>
<div id="bolme_islemi">bolme_islemi</div>

Everything is an object in JavaScript (except primitive values). If you don't want the style property values returned, do the steps separately:

var toplama_islemi = document.getElementById("toplama_islemi");
toplama.style.display = "none";

Now the element is assigned to the variable instead.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!