WD-40 was developed by the military in the 50s as a rust preventative solvent and de-greaser to protect missile parts. It quickly became a household item when people discovered it had thousands of other uses as a cleaner, rust-prevention agent, squeak-stopper and more. It also works wonders as a light lubricant on small items like hinges, locks, and toys.
Bicycle chains, on the other hand, are far too heavy and fast-moving for the lubricating power of WD-40 to have any effect at all. As a matter of fact, WD-40 will actually strip away any existing lubricant and leave your drivetrain dry – metal on metal. Basically, spraying this stuff on your chain is worse than using no lubricant at all!
Obviously, I strongly recommend using chain oil purchased from your local bike shop. Just go down there and ask them for regular waterproof chain oil. It shouldn’t be any more than RM30 and it’s the best thing you can buy for your bike.