
Some Example Programs of While Loop Using Java Script
Today I post a some example programs of while loop using Java script.this all programs are the technical Programs of some companies to ask their technical rounds. 1️⃣ MULTIPLES OF 3 AND 5? To find multiples of 3 and 5 it means what number divisible by 3 and 5 is called multiples. Find the multiples use the modulo operator (%).This operator used for find a remaider value otherwise division (/) operator used for only quotient. PROGRAM: STEPS: ✓First take the initial value i = 3.because 3 is starting value from given number. ✓Then give the condition , assume final value is 100, so take the value (i<=100) ✓Next check given number divisible by i,so give(i % 3 == 0 && i % 5 == 0). ✓ Print the value of i. ✓Then increment the value of i. WORKING: 1.First take given value 3. 2.Then check the condition (i<=100). 3.Next check the if condition (i % 3 == 0 && i % 5 == 0) it's makes sure the which number gets divided and gets remainder 0. ◾ i is 3 .(3<=100 true).then check the if condition.(3%3==0 t
Continue reading on Dev.to JavaScript
Opens in a new tab




