#JavaScript/Haskell, 158 bytes 147 bytes
JavaScript/Haskell, 158 bytes 147 bytes
General idea: sneak each one's comment syntax into the other.
In one line:
u="This program wasn't written in ";v=", it was built for ";j="JavaScript";h="Haskell";{-console.log(u+j+v+h+"!")}//-}main=putStrLn$u++h++v++j++"!" What this looks like to Haskell:
-- some variable definitions u = "This program wasn't written in " v = ", it was built for " j = "JavaScript" h = "Haskell" -- a comment {-console.log(u+j+v+h+"!")}//-} -- the main method that does the dirty deed main = putStrLn $ u ++ h ++ v ++ j ++ "!" What this looks like to JavaScript:
/* variables can be declared without `var` */ u = "This program wasn't written in "; v = ", it was built for "; j = "JavaScript"; h = "Haskell"; /* hey look, an anonymous block! */ { /* we negate the `undefined` that comes out of console.log */ -console.log(u+j+v+h+"!") } /* there are two automatic semicolon insertions here: one before `}` and one before EOF. */ /* a one-line comment. */ //-}main=putStrLn$u++h++v++j++"!"