I was wondering if somebody could explain this to me.
I am trying to find numbers that are NOT divisible by other numbers.
Originally i wrote:

if i%3!==0

however it came up with an error and said it was invalid syntax
Instead my code now reads

if i%3!=0

This works but i don't understand why i have to take the 2nd equals sign out.
Many thanks

Recommended Answers

All 2 Replies

Wait. == is equal to
!= is not equal to
so the ! replaces the first = ?
writing !== is saying is not equal to is equal to
am i correct?

Follow the manual. There is no such thing as the !== operator.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.